diff --git a/.gitignore b/.gitignore index d88c110b..63f414d5 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 @@ -29,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/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..4fb5b72d --- /dev/null +++ b/docs/generating_java.md @@ -0,0 +1,99 @@ +# 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. + +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 + +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 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()`). + +* `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. + +* 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. + +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`). 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 new file mode 100644 index 00000000..824a3a3d --- /dev/null +++ b/src/generators/java/generator.cpp @@ -0,0 +1,2595 @@ +#include "generators/java/generator.h" + +#include "common/hash.h" +#include "common/strings.h" + +#include +#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. + for (const auto &segment : base_package_segments) + iter->second.used_names.insert(segment); + } + 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::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) + 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)); + // 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()) + { + 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, ShortenClassName(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, 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); + + 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); + } + + // 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.callable_info && 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->callable_info; + 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. */ +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. */ +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. + * + * 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`. + * + * 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 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"; + 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 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) + { + 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 + "`."); + Throwable windowsError = null; + if (IS_WINDOWS) + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } + if (ret == null) + { + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + if (windowsError != null) + e.addSuppressed(windowsError); + 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; + } + + // 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)) + { + 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; + 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 -> + { + 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); + } + }; + } + + /** + * 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); + } +)"; + + 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 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"; + 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.set(text.toString());\n }\n\n"; + ffi += " static\n {\n"; + ffi += " try\n {\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"; + } + 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; + 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) + { + 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.param_indices[i] = ret.params.size(); + 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"); + + 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++; + } + } + // 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; + 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"; + 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"; + } + + EmitCasts(info, members, used_keys); + if (cl.callable_info && info.has_destroy) + EmitStdFunction(info, members, used_keys); + + // 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) || 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; + 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 + "`. */\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. */\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..6b0d5788 --- /dev/null +++ b/src/generators/java/generator.h @@ -0,0 +1,213 @@ +#pragma once + +#include "generators/c_interop/c_output_desc.h" + +#include + +#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; + + // 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. + 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::vector base_package_segments; + + 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); + [[nodiscard]] std::string ShortenClassName(std::string name) const; + + 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; + 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); + // 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); + + // 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); + + [[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..089028cd --- /dev/null +++ b/src/generators/java/main.cpp @@ -0,0 +1,152 @@ +#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("--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) + { + (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/output_java/src/mrbind_test/CppException.java b/test/output_java/src/mrbind_test/CppException.java new file mode 100644 index 00000000..3f1347df --- /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. */ +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..a945b109 --- /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. + * + * 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..b7485a86 --- /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`. + * + * 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..b7c37f06 --- /dev/null +++ b/test/output_java/src/mrbind_test/Ffi.java @@ -0,0 +1,392 @@ +package mrbind_test; + +/** 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 +{ + 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 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) + { + 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 + "`."); + Throwable windowsError = null; + if (IS_WINDOWS) + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } + if (ret == null) + { + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + if (windowsError != null) + e.addSuppressed(windowsError); + 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; + } + + // 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)) + { + 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; + 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 -> + { + 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); + } + }; + } + + /** + * 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); + } + + // 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(); + 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.set(text.toString()); + } + + static + { + try + { + 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) + { + // 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/src/mrbind_test/Native.java b/test/output_java/src/mrbind_test/Native.java new file mode 100644 index 00000000..30d65d27 --- /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. */ +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..1c086a02 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. */ +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)); + 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 new file mode 100644 index 00000000..5fcaed0c --- /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`. */ +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..f98dda1c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. */ +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)); + 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 new file mode 100644 index 00000000..35518947 --- /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`. */ +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..3bce5034 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ +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)); + 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 new file mode 100644 index 00000000..15ccc6ff --- /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`. */ +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..e6078ca4 --- /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`. */ +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..d332e12e --- /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`. */ +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..d6f17c03 --- /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`. */ +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..aead1bba --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,80 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. */ +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_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)); + 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_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 new file mode 100644 index 00000000..a2a94fa6 --- /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`. */ +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..7269189d --- /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`. */ +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..3542c3c5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,204 @@ +package mrbind_test.ffi.MR; + +/** 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() {} + + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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)); + 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 new file mode 100644 index 00000000..21dc4403 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1373 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. */ +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_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 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)); + 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 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)); + 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_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_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_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)); + 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 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)); + 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 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 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)); + 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_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_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 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_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)); + 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 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)); + 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 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..f66110e9 --- /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`. */ +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..2f792da8 --- /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`. */ +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..be854c6a --- /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`. */ +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..516cd872 --- /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`. */ +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..6cd6a94f --- /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`. */ +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..a6c1db34 --- /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`. */ +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..cf32410c --- /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`. */ +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..e3d4041b --- /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`. */ +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..dda299b1 --- /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`. */ +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..80b05b20 --- /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`. */ +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..e429b601 --- /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`. */ +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..663f9224 --- /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`. */ +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..ad966fcf --- /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`. */ +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..c45226cd --- /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`. */ +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..ce5bdcde --- /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`. */ +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..9b9c285b --- /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`. */ +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..6d674e77 --- /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`. */ +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..e6a62fc1 --- /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`. */ +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..9100e505 --- /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`. */ +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..d6880507 --- /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`. */ +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..1277fca9 --- /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`. */ +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..88ec684d --- /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`. */ +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..6f7d572c --- /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`. */ +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..b8bef6bf --- /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`. */ +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..9484cdac --- /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`. */ +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..c3210bb9 --- /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`. */ +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..b4897179 --- /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`. */ +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..160182b4 --- /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`. */ +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..4fc442e3 --- /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`. */ +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..84f400d6 --- /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`. */ +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..ebafd4fd --- /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`. */ +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..ae94ef2b --- /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`. */ +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..65430f60 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,42 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ +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)); + 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 new file mode 100644 index 00000000..97fc13c5 --- /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`. */ +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..6a3b207f --- /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`. */ +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..9f9b2230 --- /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`. */ +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..cfb57924 --- /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`. */ +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..d4b178fa --- /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`. */ +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..d757cff6 --- /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`. */ +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..08f9e324 --- /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`. */ +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..61ef70a8 --- /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`. */ +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..6f7a4b4d --- /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`. */ +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..37c3d7cd --- /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`. */ +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..f2647cfe --- /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`. */ +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..ad7f8e0e --- /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`. */ +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..5a0646eb --- /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`. */ +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..19af44c7 --- /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`. */ +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..abf67648 --- /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`. */ +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..f60b8bd9 --- /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`. */ +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..fd04e97c --- /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`. */ +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..dd711b89 --- /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`. */ +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..6d9c4748 --- /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`. */ +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..bc47f784 --- /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`. */ +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..f36233ae --- /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`. */ +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..07834cce --- /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`. */ +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..06418ef3 --- /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`. */ +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..11d4688d --- /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`. */ +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..81e49b6b --- /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`. */ +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..89e02838 --- /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`. */ +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..a7ce53bb --- /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`. */ +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..5bc432a6 --- /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`. */ +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..5956bf88 --- /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`. */ +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..eeb4a594 --- /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`. */ +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..906da660 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..8bed5155 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..9d3583fc --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..f82513c0 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b99a0602 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int`. */ +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)); + 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 new file mode 100644 index 00000000..eb7038ed --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3b3a2717 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3a4a10d6 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..92602f42 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b0f239d1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..d3299453 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b2be91d1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. */ +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)); + 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 new file mode 100644 index 00000000..31e86a6c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..13fc74fa --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3b6161ae --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..6f238a58 --- /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`. */ +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..80aeb0e6 --- /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`. */ +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..b2b9a292 --- /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`. */ +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..87b9eb08 --- /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`. */ +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..56ecec09 --- /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`. */ +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..51c5e679 --- /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`. */ +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..314caf03 --- /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`. */ +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..4fa3463f --- /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`. */ +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..f48b4e3a --- /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`. */ +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..b6ac1fd1 --- /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`. */ +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..15cae432 --- /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`. */ +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..3282e9d2 --- /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`. */ +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..a4186168 --- /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`. */ +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..2c7ec0ae --- /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`. */ +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..ee11b710 --- /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`. */ +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..b339627b --- /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`. */ +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..d70ac82e --- /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`. */ +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..5ea915b4 --- /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`. */ +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..d0701981 --- /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`. */ +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..9a6495e0 --- /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`. */ +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..5656eb09 --- /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`. */ +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..00c7ce70 --- /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`. */ +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..08547589 --- /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`. */ +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..1a1ad1c2 --- /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`. */ +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..38392a76 --- /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`. */ +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..677b84ae --- /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`. */ +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..b1da301a --- /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`. */ +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..1263684d --- /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`. */ +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..95c94dc8 --- /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`. */ +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..3145d379 --- /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`. */ +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..dbc896b8 --- /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`. */ +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..cccfe2cb --- /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`. */ +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..274d1a0d --- /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`. */ +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..79cc6ffd --- /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`. */ +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..19805dd4 --- /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`. */ +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..cb1ba328 --- /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`. */ +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..bc74688d --- /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`. */ +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..8af41b39 --- /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`. */ +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..98d5526b --- /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`. */ +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..20832f16 --- /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`. */ +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..ff6f8f39 --- /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`. */ +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..1a9103ba --- /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`. */ +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..1c03b1a4 --- /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`. */ +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..dd077da1 --- /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`. */ +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..7b0b77d8 --- /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`. */ +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..fc26ab1a --- /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`. */ +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..14953c19 --- /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`. */ +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..a9f0271f --- /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`. */ +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..2887abfd --- /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`. */ +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..aa5ddfb3 --- /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`. */ +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..be5b9c6e --- /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`. */ +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..77b66045 --- /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`. */ +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..336ea3bf --- /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`. */ +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..c0356ab6 --- /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`. */ +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..97fb581a --- /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`. */ +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..4764212a --- /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`. */ +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..743c7ec5 --- /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`. */ +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..5e31e992 --- /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`. */ +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..a371e80d --- /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`. */ +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..850b5d53 --- /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`. */ +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..378ae9f1 --- /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`. */ +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..6be24221 --- /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`. */ +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..90a276f0 --- /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`. */ +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..18c7fb3e --- /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`. */ +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..78817e69 --- /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`. */ +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..49d7c0d2 --- /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`. */ +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..627943b1 --- /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`. */ +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..4792ec2b --- /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`. */ +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..c66b1bdd --- /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`. */ +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..5197e968 --- /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`. */ +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..1f41462b --- /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`. */ +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..f538edbc --- /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`. */ +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..5aed4634 --- /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`. */ +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..f03eb910 --- /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`. */ +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..05948578 --- /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`. */ +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..cc6f5b1f --- /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`. */ +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..db2104c9 --- /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`. */ +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..2f233c54 --- /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`. */ +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..efd501e3 --- /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`. */ +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..29ef947c --- /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`. */ +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..1e87dd24 --- /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`. */ +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..79f6018a --- /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`. */ +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..eb25b044 --- /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`. */ +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..cd63cb4b --- /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`. */ +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..633916a4 --- /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`. */ +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..14fdd716 --- /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`. */ +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..704835c9 --- /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`. */ +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..94d8fa56 --- /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`. */ +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..70b1b304 --- /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`. */ +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..5c8bef1d --- /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`. */ +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..a595b32f --- /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`. */ +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..f3ba497b --- /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`. */ +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..87b0dd90 --- /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`. */ +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..27f4ce7e --- /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`. */ +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..c525dc14 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/A.java @@ -0,0 +1,154 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/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..28ed7490 --- /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. */ +@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..6d96c068 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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 new file mode 100644 index 00000000..0540f87b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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/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..536ba196 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,110 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a610850a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,211 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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/adjustingnames/Functions.java b/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java new file mode 100644 index 00000000..4d664bcf --- /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. */ +@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..4dd5db2a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,227 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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)); + 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/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..5698c344 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,497 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/D.java b/test/output_java/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..0934c0a2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,542 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/E.java b/test/output_java/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..9dc267ed --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,592 @@ +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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..d46a312d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,153 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..04210068 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,189 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a8d4ec07 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,150 @@ +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); + } + } + + /** 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/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..81ce9f6f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,152 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a0cbdaf8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,149 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..135e73e7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,191 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..c6211ec0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,170 @@ +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); + } + } + + /** 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/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..7878f307 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,291 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/B.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..4ea2c288 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,281 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/C.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..06120dd8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,188 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..be5c2553 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,297 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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::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 new file mode 100644 index 00000000..79b2d076 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..e5d2d3e6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..824300f1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,279 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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..ea4b3ce8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,315 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java new file mode 100644 index 00000000..0b575e39 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,315 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java new file mode 100644 index 00000000..93b7c3d2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,301 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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_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/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..574eee03 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,301 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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..07aa1002 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,340 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java new file mode 100644 index 00000000..5fb9ca1d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,379 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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/src/mrbind_test/mr/cs/Functions.java b/test/output_java/src/mrbind_test/mr/cs/Functions.java new file mode 100644 index 00000000..370c7484 --- /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. */ +@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..e484ab62 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..570af0ba --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..d5dd21bc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..df121736 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..6d539445 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a17f9f98 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..02a31d42 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..39a43f38 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..1f2b58d7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..35113571 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..55c1d17d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..8c6de0c3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,228 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..0071ea5b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,229 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..14e198eb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java @@ -0,0 +1,228 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..521708af --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -0,0 +1,229 @@ +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); + } + } + + /** 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/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..21aaece3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,484 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + 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/csharp/B.java b/test/output_java/src/mrbind_test/mr/csharp/B.java new file mode 100644 index 00000000..25e59795 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,338 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..73cf5bd8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,294 @@ +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.H2.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.H2.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.H2.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); + } + } + + /** 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/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..d64099a9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..12a9c63c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,360 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } +} 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..c497434f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,359 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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/csharp/ClassMemberPointersUshort.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java new file mode 100644 index 00000000..191b5b42 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..3db7d12c --- /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.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) + { + 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..90e54ffc --- /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.H3.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.H3.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.H3.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.H3.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..fcad7b57 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,484 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..f70b61b9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7434 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. */ +@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))); + mrbind_test.Ffi.checkException(); + 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..5883f28f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,466 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..ccc9dfd1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,200 @@ +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")); + 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::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..9fac5969 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,199 @@ +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")); + 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::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..d345a99d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,198 @@ +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()); + 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); + } + } + + /** + * 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); + 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/IndexerB.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..4961db4e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,254 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..93c81c41 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableA.java @@ -0,0 +1,196 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableB.java b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java new file mode 100644 index 00000000..022234c0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java @@ -0,0 +1,196 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableC.java b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java new file mode 100644 index 00000000..0f621259 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,244 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableD.java b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java new file mode 100644 index 00000000..c0f3717f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableE.java b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java new file mode 100644 index 00000000..500f3a32 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableF.java b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java new file mode 100644 index 00000000..38e8a875 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableG.java b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java new file mode 100644 index 00000000..bc4d61cb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java @@ -0,0 +1,199 @@ +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.H4.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.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); + } + 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.H4.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + 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/csharp/IterableH.java b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java new file mode 100644 index 00000000..4edc4153 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java @@ -0,0 +1,200 @@ +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.H4.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.H4.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.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) + { + 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.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); + } + 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.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); + } + 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.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); + } + 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.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); + } + 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.H4.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + 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/csharp/IterableI.java b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java new file mode 100644 index 00000000..9e45a175 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java @@ -0,0 +1,199 @@ +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.H4.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.H4.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.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); + } + 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.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); + } + 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.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); + } + 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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableJ.java b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java new file mode 100644 index 00000000..db53dbfb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java @@ -0,0 +1,200 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableK.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java new file mode 100644 index 00000000..a05fba68 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java @@ -0,0 +1,197 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/IterableK_Iter.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java new file mode 100644 index 00000000..2c9f8308 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,245 @@ +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()); + mrbind_test.Ffi.checkException(); + 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); + 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/IterableK_Sentinel.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java new file mode 100644 index 00000000..bc28814d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,176 @@ +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()); + mrbind_test.Ffi.checkException(); + 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); + 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/IterableL_int.java b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java new file mode 100644 index 00000000..6c46cc80 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java @@ -0,0 +1,196 @@ +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()); + 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); + } + } + + /** + * 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(); + 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/csharp/LifetimesA.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java new file mode 100644 index 00000000..72d0d2b5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,223 @@ +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()); + 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); + } + } + + /** + * 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); + 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/LifetimesB.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..68ec1fb4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,258 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..cac6fc8d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,182 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..7ef26277 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,371 @@ +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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..d0e24f9a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,234 @@ +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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..c770217a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,251 @@ +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()); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..5386faed --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..e7f51184 --- /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.H5.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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..e956e60f --- /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.H5.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.H5.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.H5.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.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); + } + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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..49d64e51 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,107 @@ +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.H5.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.H5.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.H5.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); + } + } + + /** + * 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.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); + } + 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..cc394ebd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,184 @@ +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.H5.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()); + 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); + } + } + + /** + * 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)); + 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/SC.java b/test/output_java/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..aafa9ad3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,239 @@ +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()); + 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); + } + } + + /** + * 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)); + 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) + { + 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/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..a7236f82 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,184 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/SF.java b/test/output_java/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..71beca44 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,259 @@ +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()); + 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); + } + } + + /** + * 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)); + 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) + { + 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/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..df020537 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,529 @@ +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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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(); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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)); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * < 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()); + 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); + } + } + + /** + * < 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); + 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::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()); + 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); + } + } + + /** + * 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()); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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/csharp/TestOpsA.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java new file mode 100644 index 00000000..23d2ceca --- /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.H6.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.H6.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.H6.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.H6.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..60d60d6e --- /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.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) + { + 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.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) + { + 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.H6.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.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) + { + 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.H6.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.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) + { + 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.H6.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.H6.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.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) + { + 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..d2fc362c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,511 @@ +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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } +} 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..ea9816a3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..441125ac --- /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. */ +@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..c5841177 --- /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. */ +@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..22998e45 --- /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. */ +@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..df7dfe44 --- /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. */ +@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..c9f2e647 --- /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. */ +@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..8808e831 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java @@ -0,0 +1,222 @@ +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()); + 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); + } + } + + /** + * 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); + 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/lifetimeinference/B.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..0af5d130 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,174 @@ +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()); + 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); + } + } + + /** + * 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); + 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/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..5ec0fc2f --- /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. */ +@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..21fdfc44 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,98 @@ +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(); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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..c23bb2ae --- /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. */ +@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..8cf13345 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,249 @@ +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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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(); + 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/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..51db6dd5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,230 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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) + { + 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); + 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/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..83f8e16d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,128 @@ +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")); + 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::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..dcd5cf64 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -0,0 +1,151 @@ +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")); + 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::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..d206956d --- /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. */ +@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..4b146425 --- /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. */ +@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..bca7a875 --- /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. */ +@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..140351a0 --- /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. */ +@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..14d92f69 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,153 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..35b84c99 --- /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. */ +@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..dcb3a824 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,159 @@ +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(); + 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); + } + } + + /** + * 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); + 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/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..79818ac9 --- /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. */ +@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..eb465f1d --- /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. */ +@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..b6f01f2a --- /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. */ +@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..e4c0462f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,179 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/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..29a235ca --- /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. */ +@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..963d89f2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,174 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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); + 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/stdoptional/B.java b/test/output_java/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..9484afc6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,179 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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)); + 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/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..7d0332e7 --- /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. */ +@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..c6fccd3b --- /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. */ +@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..f58ee771 --- /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. */ +@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..771bdf30 --- /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. */ +@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..5940ada2 --- /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. */ +@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..17db6080 --- /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. */ +@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..f77b9b6c --- /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. */ +@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..64da91ac --- /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. */ +@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..c723ed2a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java @@ -0,0 +1,216 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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_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..3ca2609f --- /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. */ +@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..8e432cde --- /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. */ +@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..b41c489f --- /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. */ +@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..9130a7b2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,276 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/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..345eeea1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,291 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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); + 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/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..3f1347df --- /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. */ +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..a945b109 --- /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. + * + * 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..b7485a86 --- /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`. + * + * 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..2ffc02b1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java @@ -0,0 +1,361 @@ +package mrbind_test; + +/** 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 +{ + 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 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) + { + 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 + "`."); + Throwable windowsError = null; + if (IS_WINDOWS) + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } + if (ret == null) + { + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + if (windowsError != null) + e.addSuppressed(windowsError); + 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; + } + + // 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)) + { + 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; + 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 -> + { + 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); + } + }; + } + + /** + * 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); + } + + // 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 new file mode 100644 index 00000000..30d65d27 --- /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. */ +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..8494bfba --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. */ +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)); + 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 new file mode 100644 index 00000000..f56227e8 --- /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`. */ +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..cdd2e937 --- /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`. */ +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..7b68313a --- /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`. */ +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..5fcaed0c --- /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`. */ +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..85e3c65c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. */ +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)); + 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 new file mode 100644 index 00000000..afb1e511 --- /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`. */ +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..35518947 --- /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`. */ +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..f5c35f9f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ +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)); + 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 new file mode 100644 index 00000000..bdbee631 --- /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`. */ +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..23d71823 --- /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`. */ +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..d332e12e --- /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`. */ +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..d6f17c03 --- /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`. */ +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..aead1bba --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,80 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. */ +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_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)); + 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_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 new file mode 100644 index 00000000..a2a94fa6 --- /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`. */ +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..7269189d --- /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`. */ +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..4fb4f94c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,132 @@ +package mrbind_test.ffi.MR; + +/** 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() {} + + 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_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)); + 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_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 new file mode 100644 index 00000000..b7f5420f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1331 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. */ +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_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 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)); + 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 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)); + 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 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)); + 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_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_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)); + 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_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)); + 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 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 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)); + 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/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..f66110e9 --- /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`. */ +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..2f792da8 --- /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`. */ +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..be854c6a --- /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`. */ +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..516cd872 --- /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`. */ +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..6cd6a94f --- /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`. */ +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..a6c1db34 --- /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`. */ +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..cf32410c --- /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`. */ +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..e3d4041b --- /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`. */ +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..dda299b1 --- /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`. */ +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..80b05b20 --- /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`. */ +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..e429b601 --- /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`. */ +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..c938a03e --- /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`. */ +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..ad966fcf --- /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`. */ +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..c46e8cef --- /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`. */ +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..ce5bdcde --- /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`. */ +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..ea5bd2c6 --- /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`. */ +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..01ffd4ab --- /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`. */ +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..1bb51a80 --- /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`. */ +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..382ecaaa --- /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`. */ +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..d6880507 --- /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`. */ +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..f70f5818 --- /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`. */ +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..88ec684d --- /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`. */ +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..6f7d572c --- /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`. */ +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..4167153f --- /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`. */ +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..9484cdac --- /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`. */ +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..c3210bb9 --- /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`. */ +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..b4897179 --- /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`. */ +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..160182b4 --- /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`. */ +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..4fc442e3 --- /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`. */ +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..84f400d6 --- /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`. */ +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..e70d8ffc --- /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`. */ +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..bd08f4cb --- /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`. */ +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..7190b3b5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ +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)); + 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 new file mode 100644 index 00000000..97fc13c5 --- /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`. */ +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..856960ee --- /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`. */ +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..d5f76fb5 --- /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`. */ +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..a54a04f4 --- /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`. */ +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..286aec24 --- /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`. */ +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..6b82fef6 --- /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`. */ +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..8708dab9 --- /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`. */ +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..be5c17a7 --- /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`. */ +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..b86acbbf --- /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`. */ +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..312fa6da --- /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`. */ +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..6a3b207f --- /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`. */ +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..4bd85ce8 --- /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`. */ +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..7b3cc793 --- /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`. */ +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..82b7683d --- /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`. */ +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..07664170 --- /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`. */ +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..f77c8a1d --- /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`. */ +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..4ffefd68 --- /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`. */ +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..31aa3b13 --- /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`. */ +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..5fd32167 --- /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`. */ +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..563f5839 --- /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`. */ +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..3c8e8399 --- /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`. */ +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..7b2b150b --- /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`. */ +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..4ea0273d --- /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`. */ +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..abf67648 --- /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`. */ +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..f60b8bd9 --- /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`. */ +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..436537f0 --- /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`. */ +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..8bb3fb97 --- /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`. */ +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..6d9c4748 --- /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`. */ +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..41e0b031 --- /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`. */ +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..eeb4a594 --- /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`. */ +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..906da660 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..8bed5155 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..9d3583fc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..a9f1ceff --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..a8b388fa --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t`. */ +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)); + 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 new file mode 100644 index 00000000..c81a44d2 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..474d4894 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..28f48f4c --- /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,22 @@ +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`. */ +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)); + 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 new file mode 100644 index 00000000..3bd58a58 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..18c60b94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..acdbc924 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b2be91d1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. */ +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)); + 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 new file mode 100644 index 00000000..31e86a6c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..60b6dea2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3b6161ae --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..6f238a58 --- /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`. */ +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..490552a6 --- /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`. */ +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..b2b9a292 --- /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`. */ +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..a11cf576 --- /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`. */ +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..56ecec09 --- /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`. */ +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..a1ec40c4 --- /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`. */ +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..314caf03 --- /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`. */ +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..4fa3463f --- /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`. */ +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..39433c69 --- /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`. */ +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..b6ac1fd1 --- /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`. */ +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..15cae432 --- /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`. */ +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..3282e9d2 --- /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`. */ +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..a4186168 --- /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`. */ +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..2c7ec0ae --- /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`. */ +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..ee11b710 --- /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`. */ +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..b339627b --- /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`. */ +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..0f4ff6a4 --- /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`. */ +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..5ea915b4 --- /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`. */ +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..9a6495e0 --- /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`. */ +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..045a8858 --- /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`. */ +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..f2c39c34 --- /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`. */ +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..bfb1e927 --- /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`. */ +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..61b822ca --- /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`. */ +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..3f3fe455 --- /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`. */ +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..66c242b8 --- /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`. */ +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..b7a94b34 --- /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`. */ +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..1263684d --- /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`. */ +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..95c94dc8 --- /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`. */ +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..2216bb6d --- /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`. */ +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..dbc896b8 --- /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`. */ +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..cccfe2cb --- /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`. */ +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..274d1a0d --- /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`. */ +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..79cc6ffd --- /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`. */ +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..19805dd4 --- /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`. */ +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..cb1ba328 --- /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`. */ +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..bc74688d --- /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`. */ +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..8af41b39 --- /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`. */ +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..98d5526b --- /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`. */ +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..20832f16 --- /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`. */ +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..ff6f8f39 --- /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`. */ +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..1a9103ba --- /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`. */ +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..9700a3bf --- /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`. */ +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..a9e0f273 --- /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`. */ +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..428ec1a7 --- /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`. */ +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..fc26ab1a --- /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`. */ +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..aa540f02 --- /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`. */ +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..4e214a53 --- /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`. */ +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..e5bee71f --- /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`. */ +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..aa5ddfb3 --- /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`. */ +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..be5b9c6e --- /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`. */ +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..77b66045 --- /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`. */ +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..336ea3bf --- /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`. */ +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..c0356ab6 --- /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`. */ +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..97fb581a --- /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`. */ +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..4764212a --- /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`. */ +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..f14ee396 --- /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`. */ +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..d2051726 --- /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`. */ +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..064459d5 --- /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`. */ +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..b70c96e7 --- /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`. */ +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..b243c291 --- /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`. */ +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..9667fb6b --- /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`. */ +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..836573be --- /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`. */ +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..5bad0d3a --- /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`. */ +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..78817e69 --- /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`. */ +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..49d7c0d2 --- /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`. */ +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..0b439268 --- /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`. */ +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..d473674e --- /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`. */ +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..c66b1bdd --- /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`. */ +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..59382d8c --- /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`. */ +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..1f41462b --- /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`. */ +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..e7a88626 --- /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`. */ +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..5aed4634 --- /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`. */ +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..cf968a1c --- /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`. */ +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..05948578 --- /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`. */ +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..722776ef --- /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`. */ +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..8523de08 --- /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`. */ +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..e7827e65 --- /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`. */ +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..88c8c43d --- /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`. */ +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..1ea1402d --- /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`. */ +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..eb1c69f0 --- /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`. */ +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..79f6018a --- /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`. */ +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..eb25b044 --- /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`. */ +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..cd63cb4b --- /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`. */ +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..704835c9 --- /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`. */ +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..94d8fa56 --- /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`. */ +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..70b1b304 --- /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`. */ +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..eb9415f8 --- /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`. */ +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..b1bf2f25 --- /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`. */ +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..5400a8f1 --- /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`. */ +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..86a7b033 --- /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`. */ +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..c525dc14 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java @@ -0,0 +1,154 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java new file mode 100644 index 00000000..651602c6 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..28ed7490 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java @@ -0,0 +1,126 @@ +package mrbind_test.mr; + +/** The free functions of this namespace. */ +@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_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..6d96c068 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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 new file mode 100644 index 00000000..0540f87b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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 new file mode 100644 index 00000000..a55dd2c6 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..e35d3ed0 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..1b6aea5f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,88 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..18e21c69 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,211 @@ +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 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()); + 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_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(); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + } + 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..49732040 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.adjustingnames; + +/** The free functions of this namespace. */ +@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_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..6eb4c8e4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,229 @@ +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 `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)); + 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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)); + 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/aggregates/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java new file mode 100644 index 00000000..fa2565ef --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9dd76785 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,513 @@ +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. + * 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); + 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..b4c31fb7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,527 @@ +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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..3b6e6a79 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,610 @@ +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 `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")); + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..519a6f4d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..90d91fef --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..d46a312d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,153 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..04210068 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,189 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a8d4ec07 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,150 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..8d5bf1eb --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..5bff36d9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..200c7d58 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f48fb98c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..81ce9f6f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,152 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a0cbdaf8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,149 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..135e73e7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,191 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..c6211ec0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,170 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..5760a6a2 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..028c87d1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,294 @@ +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. + * 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); + 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 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()); + 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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..d66f2765 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,284 @@ +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. + * 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); + 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 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()); + 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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..06120dd8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,188 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..6d14e3d7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,151 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..79b2d076 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..e5d2d3e6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a573681c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,133 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..9f132a38 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,169 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..8ca084a6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,169 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..bfd05649 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,155 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..7134f071 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..58b3e2a5 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..6f5ce443 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,155 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..c542e44e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,194 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..101ba28a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,233 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..c3bddb20 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java @@ -0,0 +1,2680 @@ +package mrbind_test.mr.cs; + +/** The free functions of this namespace. */ +@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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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..9af50f6d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..61a13a5c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..4b875c9c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..3eedaaf9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..acf4925e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..25ea9890 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..7db3d241 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java @@ -0,0 +1,221 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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 `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()); + 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_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()); + 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 `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()); + 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_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()); + 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_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..88180287 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java @@ -0,0 +1,223 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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 `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()); + 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_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()); + 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 `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()); + 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_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()); + 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_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..19abea54 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..8b73fe8e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..a0963b96 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..8cfda3a9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..cc703535 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..07fc84dd --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..52ee78ec --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java @@ -0,0 +1,873 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_int32_t_clear()`. + */ + 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) + { + 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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..44092888 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java @@ -0,0 +1,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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..56dd10a5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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_filesystem_path.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java new file mode 100644 index 00000000..222747a8 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..e484ab62 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..570af0ba --- /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,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..d5dd21bc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a95277df --- /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,231 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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); + } + } + + /** 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 new file mode 100644 index 00000000..30c38413 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java @@ -0,0 +1,231 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_int32_t_reset()`. + */ + 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) + { + 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()); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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 + { + 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 new file mode 100644 index 00000000..f9d97dd2 --- /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,231 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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 + { + 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 new file mode 100644 index 00000000..8268df44 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java @@ -0,0 +1,232 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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)); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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 + { + 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 new file mode 100644 index 00000000..72dcdf3d --- /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,231 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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 + { + 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 new file mode 100644 index 00000000..f213a11a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java @@ -0,0 +1,231 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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 + { + 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 new file mode 100644 index 00000000..bdaeab34 --- /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,232 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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); + } + } + + /** 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 new file mode 100644 index 00000000..d616c865 --- /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,232 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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); + } + } + + /** 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 new file mode 100644 index 00000000..8c6de0c3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,228 @@ +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); + } + } + + /** 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_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..0071ea5b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,229 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..8230bbc6 --- /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,228 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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) + { + 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..521708af --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -0,0 +1,229 @@ +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); + } + } + + /** 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_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..bbfa5193 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..87580369 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..67a27b6e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..5029ac5f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java @@ -0,0 +1,732 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_int32_t_clear()`. + */ + 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) + { + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..78af5535 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java @@ -0,0 +1,198 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + 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_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()); + 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_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()); + 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_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..96a1e4ac --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java @@ -0,0 +1,170 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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..316caf47 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c5049742 --- /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,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_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..8dae40fb --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3875373e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + mrbind_test.Ffi.checkException(); + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..98d14790 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java @@ -0,0 +1,247 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..8baf7ccf --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java @@ -0,0 +1,219 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..45b15283 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c0e6262f --- /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,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_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..0d8d6aa3 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..7e09762f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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)); + mrbind_test.Ffi.checkException(); + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..da74ec0d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java @@ -0,0 +1,247 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..3fd9ca8b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java @@ -0,0 +1,219 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..146ed89a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9efcb155 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..af0326b2 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..97bafc7a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..553a7c90 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_int32_t_clear()`. + */ + 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) + { + 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)); + 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_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)); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..58cd661c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java @@ -0,0 +1,170 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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..9dfd4d60 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..d73ec4ca --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c1908c81 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c759c355 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3a62455c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3276872d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..4e677ea0 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fe59943d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java @@ -0,0 +1,219 @@ +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(); + 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_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")); + 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_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)); + 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_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")); + mrbind_test.Ffi.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_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)); + 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_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()); + 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_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()); + 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_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()); + 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_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..ba3496bf --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..a4ccbb58 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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")); + 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.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) + { + 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")); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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_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..2781e8ec --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..cfdd027f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java @@ -0,0 +1,175 @@ +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(); + 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_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")); + 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. + * + * 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); + 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_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()); + 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_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()); + 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_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()); + 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_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..910895c0 --- /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,128 @@ +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")); + 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_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)); + 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_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()); + 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_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()); + 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_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..bb834348 --- /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,128 @@ +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")); + 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_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)); + 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_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()); + 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_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()); + 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_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..87ecd9f5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java @@ -0,0 +1,223 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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. + * + * 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); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..b9136230 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java @@ -0,0 +1,99 @@ +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); + 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_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()); + 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_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()); + 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_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..6902fbd4 --- /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,128 @@ +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")); + 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_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); + 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_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()); + 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_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()); + 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_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..7cfb04db --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java @@ -0,0 +1,227 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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)); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..8d32adf3 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..48621f01 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..338b722d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..2ec4fc19 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..98feed7a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_int32_t_clear()`. + */ + 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) + { + 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)); + 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_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)); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..47b61299 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java @@ -0,0 +1,170 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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..eed523a3 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..520b3fcb --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..4f78dc96 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..73d9bd0f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..b164cd32 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..5ccd29b4 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..525b196c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fc76f28a --- /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,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_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..32760b4a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..32d374d6 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9636c178 --- /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,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_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..cbab05ef --- /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,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_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..ade02684 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java @@ -0,0 +1,457 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + 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_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))); + 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_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))); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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))); + 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_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))); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..2fc82733 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_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 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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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)); + 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_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)); + 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_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))); + 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_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))); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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))); + 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_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))); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..28329ffb --- /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,442 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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))); + 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_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))); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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))); + 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_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))); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..62f7fd10 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9da50e10 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java @@ -0,0 +1,406 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..9c3fdb67 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java @@ -0,0 +1,430 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..3b7b68eb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_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 `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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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) + { + 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); + 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_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); + 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) + { + 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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..e1f89652 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f5a89865 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..38b6d2a2 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..33b85c6e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..8edc1eee --- /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,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_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..71b5a4f3 --- /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,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_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..2727d2f7 --- /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,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_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..5fe3419c --- /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,298 @@ +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)); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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 `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()); + 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_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()); + 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 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()); + 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_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()); + 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 `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()); + 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_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()); + 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 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()); + 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_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()); + 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_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..c5aeddc1 --- /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,182 @@ +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")); + 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_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)); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..ad377cb8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java @@ -0,0 +1,179 @@ +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(); + 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_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")); + 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_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)); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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..6d921ed1 --- /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,320 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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 `_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); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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 `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()); + 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 `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()); + 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 `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()); + 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 `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()); + 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_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..ad61f572 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java @@ -0,0 +1,175 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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 `_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); + mrbind_test.Ffi.checkException(); + 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()); + 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 `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()); + 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_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..67ecfd23 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java @@ -0,0 +1,223 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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 `_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); + mrbind_test.Ffi.checkException(); + 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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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..3a6defd7 --- /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,156 @@ +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)); + 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 `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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..b91b77c3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java @@ -0,0 +1,227 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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 `_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)); + mrbind_test.Ffi.checkException(); + 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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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..145edfc4 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..86b761ad --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..69aedc0b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java @@ -0,0 +1,196 @@ +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(); + 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_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")); + 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_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); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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()); + 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_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()); + 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_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..77b7dc7d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java @@ -0,0 +1,221 @@ +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(); + 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_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")); + 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_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); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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()); + 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_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); + 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_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()); + 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_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..f82d6439 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..7f7a0983 --- /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,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_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..f2238df6 --- /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,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_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..f79e1bfd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..58be3664 --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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..38212374 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java @@ -0,0 +1,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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..1e8f792e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..71f0330b --- /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,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_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..f7672c58 --- /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,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_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..f5000177 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..c86f645f --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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..8ae0fc30 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java @@ -0,0 +1,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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..da707bac --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..484b26bc --- /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,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_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..759f9b7b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..c678416d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java @@ -0,0 +1,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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..7f807dbe --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..80193b0e --- /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,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_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..bfd810d1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..2905708e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java @@ -0,0 +1,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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..5088ec4d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java @@ -0,0 +1,315 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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 `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); + 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_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); + 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 `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); + 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_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); + 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 `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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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..e6fb33ea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java @@ -0,0 +1,399 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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 `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); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + 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_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); + 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 `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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..73382a3b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java @@ -0,0 +1,415 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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 `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); + 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_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); + 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_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)); + 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 `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); + 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_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); + 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_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)); + 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 `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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..e8e70c50 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java @@ -0,0 +1,377 @@ +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(); + 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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy 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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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(); + 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) + { + 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); + 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_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); + 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_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()); + 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 `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); + 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_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); + 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_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()); + 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 `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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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..68f50265 --- /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,461 @@ +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(); + 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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy 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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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(); + 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) + { + 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); + 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_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); + 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) + { + 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); + 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) + { + 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()); + 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 `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); + 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_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); + 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_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); + 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_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()); + 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 `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()); + 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 `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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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..38686116 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..409b31fe --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..65ea4c1d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..24645982 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..36ffd607 --- /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,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_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..329a8858 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..551e1968 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..2269bec7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..6ee3b0fe --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3ea3f795 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..f3e0e19c --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..e2fb2091 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..521fcf50 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..c282b0cb --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..3e87393f --- /dev/null +++ b/test/output_java_fixed_typedefs/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..3c5de01f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c97bba96 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..4f48ab3f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..a3d8d80c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f3f4e76e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..d483470d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..60eadc8a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9e3ec838 --- /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,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_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..3da632ea --- /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,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_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..7e1e966e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + 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()); + 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); + } + 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()); + 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); + } + 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()); + 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); + } + 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")); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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")); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..27b90c2d --- /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,221 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..36c19a03 --- /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,193 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..8dd732f2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_int32_t_clear()`. + */ + 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) + { + 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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..9d52f94a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java @@ -0,0 +1,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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..f151d4a6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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..2c760966 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_int64_t_clear()`. + */ + 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) + { + 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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + 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) + { + 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()); + 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_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()); + 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) + { + 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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..d5a18581 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java @@ -0,0 +1,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..2bbaa8e6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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..76765f9f --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..2e185217 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..1affd2e0 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..a10fb415 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_uint64_t_clear()`. + */ + 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) + { + 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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + 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) + { + 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()); + 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_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()); + 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) + { + 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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..f3d4ca88 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java @@ -0,0 +1,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..fe879d25 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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/csharp/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java new file mode 100644 index 00000000..6114e161 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..792e508f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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()); + 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_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()); + 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_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..146c55be --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,485 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..04a4ca94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,191 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..aac29211 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,147 @@ +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(); + 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); + } + } + + /** 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 new file mode 100644 index 00000000..655ed1b7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.H1.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.H1.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.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); + } + 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()); + 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.H1.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_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..d64099a9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..12a9c63c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,360 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } +} 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..c497434f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,359 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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_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..191b5b42 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..264f6048 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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); + 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_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..939291ac --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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))); + 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_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..d557d73e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..634606c7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..a773de34 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..6a486e80 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..310545d4 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..b7177555 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f56da9da --- /dev/null +++ b/test/output_java_fixed_typedefs/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 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()); + 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_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..e9b6a8da --- /dev/null +++ b/test/output_java_fixed_typedefs/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 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()); + 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 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()); + 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_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..6be932e9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..bb4e4e83 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..e17eb02a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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..3eff7f62 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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..98de25fd --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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..92fab9fa --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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))); + 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_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..e7fc2ecf --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..28a1d42c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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_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); + 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_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..cc266874 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -0,0 +1,84 @@ +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`. + * + * 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_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..2fa8e9bd --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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); + 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.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) + { + 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); + 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.H2.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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..ab45c862 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,249 @@ +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.H2.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.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) + { + 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); + } + } + + /** 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 new file mode 100644 index 00000000..1ba1bc16 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7434 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. */ +@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))); + mrbind_test.Ffi.checkException(); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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")); + 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_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")); + 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_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()); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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); + 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_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); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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_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)); + 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) + { + throw 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)); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + 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); + 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); + } + 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(); + 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) + { + 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_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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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_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); + 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_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(); + 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_int32_t()`. + */ + 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) + { + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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) + { + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + 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) + { + 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(); + 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) + { + 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(); + 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) + { + 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.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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + 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); + 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); + } + catch (java.lang.Throwable __e) + { + throw 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); + 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); + } + 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..d7988522 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..ccc9dfd1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,200 @@ +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")); + 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::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_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..9fac5969 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,199 @@ +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")); + 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::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_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..222695d9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..12a31479 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fab05d1a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..550cf599 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..ad9c1ba9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9bab68a8 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c9f2631b --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..dbf1a14e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,200 @@ +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. + * 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); + 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()); + 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); + } + } + + /** + * 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); + 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/csharp/IndexerB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..4961db4e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,254 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..5ae4eaea --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..93c81c41 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java @@ -0,0 +1,196 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..022234c0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java @@ -0,0 +1,196 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..0f621259 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,244 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..c0f3717f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..500f3a32 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..38e8a875 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..33035fe4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java @@ -0,0 +1,199 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..0d5f4b09 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java @@ -0,0 +1,200 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..53f7df7d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java @@ -0,0 +1,199 @@ +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(); + 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.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); + } + 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(); + mrbind_test.Ffi.checkException(); + 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..89182e3a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java @@ -0,0 +1,200 @@ +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(); + 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.H3.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.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); + } + 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()); + 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.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); + } + 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..3a5ca50b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java @@ -0,0 +1,197 @@ +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.H3.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.H3.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.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); + } + 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()); + 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.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) + { + 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..1edfe37b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,246 @@ +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*`. + * 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.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()); + mrbind_test.Ffi.checkException(); + 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); + 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/csharp/IterableK_Sentinel.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java new file mode 100644 index 00000000..bc28814d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,176 @@ +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()); + mrbind_test.Ffi.checkException(); + 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); + 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/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..586f7c2d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java @@ -0,0 +1,196 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..2dba0060 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,225 @@ +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. + * 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); + 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()); + 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); + } + } + + /** + * 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); + 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/csharp/LifetimesB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..68ec1fb4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,258 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..cac6fc8d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,182 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..5125b7e6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,370 @@ +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`. + * + * 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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..d0e24f9a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,234 @@ +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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..7414156f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,253 @@ +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 `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")); + 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()); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..ed36e0b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..5509b45d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..0a0ec816 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..5386faed --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..f9c852dc --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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); + 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_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..e39518cb --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..7a71aae8 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..dbe7d65e --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f2e53f39 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..766167ac --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..885fd8ae --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..43a4ebbe --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..76d9d05c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..6f03c8fa --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..82a0df95 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,107 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..b445e828 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,184 @@ +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(); + 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.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) + { + 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")); + 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.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); + } + 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()); + 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); + } + } + + /** + * 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)); + 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/csharp/SC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..62d01479 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,188 @@ +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(); + 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.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) + { + 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")); + 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); + } + } + + /** 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 new file mode 100644 index 00000000..cc09fc32 --- /dev/null +++ b/test/output_java_fixed_typedefs/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.H4.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.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) + { + 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")); + 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_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..a7236f82 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,184 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/csharp/SF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..4c0ed396 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,208 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..32b23914 --- /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.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/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..f5d03e8b --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..253abbaf --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..7f451251 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9c934217 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f3ddc8ec --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..45f47587 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..74aa8cfd --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..bae8e89f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..946f2c50 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..caa136c8 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..59723c0f --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..ea551ffc --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3a75ea52 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..bbd7bae6 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..6d4cb4de --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..19f33761 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..aa25f431 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..403c3c8a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..376149c4 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..f2cc1155 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c8b66d87 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..3524556c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..b08ae071 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,533 @@ +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` 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)); + 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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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(); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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)); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * < 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()); + 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); + } + } + + /** + * < 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); + 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::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()); + 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); + } + } + + /** + * 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()); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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_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..59c97c52 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java @@ -0,0 +1,889 @@ +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*`. + * 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()); + 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_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..cdef7695 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java @@ -0,0 +1,889 @@ +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*`. + * 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()); + 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.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) + { + 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()); + 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.H5.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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + 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_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..05c366e7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fc1b6d82 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,511 @@ +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_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")); + 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_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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } +} 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..ea9816a3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..1c79ab13 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..e4e6f70c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..91936354 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..441125ac --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.customprefnames; + +/** The free functions of this namespace. */ +@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_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..d00a457b --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..b2de2931 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..be0112cc --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fdc25e1a --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c5841177 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.deprecation; + +/** The free functions of this namespace. */ +@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_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..98f62931 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..22998e45 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** The free functions of this namespace. */ +@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_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..df7dfe44 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** The free functions of this namespace. */ +@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_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..b9a9e4d7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..c9f2e647 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java @@ -0,0 +1,54 @@ +package mrbind_test.mr.iostream; + +/** The free functions of this namespace. */ +@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_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..38fc53a9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java @@ -0,0 +1,224 @@ +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. + * 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); + 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()); + 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); + } + } + + /** + * 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); + 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/lifetimeinference/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..4f1de6fd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,176 @@ +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. + * 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); + 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()); + 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); + } + } + + /** + * 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); + 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/lifetimeinference/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java new file mode 100644 index 00000000..8607e848 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java @@ -0,0 +1,108 @@ +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`. + * + * 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_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..5ec0fc2f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.lifetimeinference; + +/** The free functions of this namespace. */ +@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_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..1020acb2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,99 @@ +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(); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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..80f56061 --- /dev/null +++ b/test/output_java_fixed_typedefs/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")); + 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()); + mrbind_test.Ffi.checkException(); + 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..c23bb2ae --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java @@ -0,0 +1,95 @@ +package mrbind_test.mr.matchinglayout; + +/** The free functions of this namespace. */ +@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_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..ef18a896 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,251 @@ +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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..cbe04c9e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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..09857441 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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..51db6dd5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,230 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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) + { + 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); + 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/nestedtypes/A_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java new file mode 100644 index 00000000..4253b30d --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..83f8e16d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,128 @@ +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")); + 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::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_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..1236b99a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java @@ -0,0 +1,151 @@ +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(); + 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_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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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")); + mrbind_test.Ffi.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_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..9714dd73 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -0,0 +1,181 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** The free functions of this namespace. */ +@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")); + 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_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")); + 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_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")); + 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_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")); + 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_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) + { + 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")); + 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_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..19cc7e33 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java @@ -0,0 +1,1148 @@ +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*`. + * 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()); + 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_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..1561199c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..8aa8c8e3 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..9287c7ea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java @@ -0,0 +1,153 @@ +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*`. + * 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()); + 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*`. + * 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()); + 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_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..82c943c5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java @@ -0,0 +1,1096 @@ +package mrbind_test.mr.overloadedops; + +/** The free functions of this namespace. */ +@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*`. + * 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")); + 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_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..4866ada3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java @@ -0,0 +1,263 @@ +package mrbind_test.mr.overloads; + +/** The free functions of this namespace. */ +@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_int32_t()`. + */ + 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) + { + 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_int32_t()`. + */ + 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) + { + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.checkException(); + } + 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..91d64f2c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.phmap; + +/** The free functions of this namespace. */ +@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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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..9e86234c --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..14d92f69 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,153 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..35b84c99 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.signaturefilters; + +/** The free functions of this namespace. */ +@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_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..d11b6fde --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,160 @@ +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(); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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..21eb8fd7 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..1dbf7101 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java @@ -0,0 +1,783 @@ +package mrbind_test.mr.stdcontainers; + +/** The free functions of this namespace. */ +@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")); + 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_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) + { + 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(); + mrbind_test.Ffi.checkException(); + 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")); + 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_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) + { + 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")); + 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_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) + { + 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")); + 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_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) + { + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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(); + 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_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) + { + 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")); + 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_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)); + 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); + } + 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_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()); + 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) + { + 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..97014ce9 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..7ebb4887 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..ced26e0c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java @@ -0,0 +1,241 @@ +package mrbind_test.mr.stdexpected; + +/** The free functions of this namespace. */ +@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(); + mrbind_test.Ffi.checkException(); + 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")); + 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.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")); + 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.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)); + 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.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) + { + 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(); + mrbind_test.Ffi.checkException(); + 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")); + 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.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.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.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_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) + { + 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..b6f01f2a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.stdfilesystem; + +/** The free functions of this namespace. */ +@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_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..e4c0462f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,179 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/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..dfcbb296 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java @@ -0,0 +1,184 @@ +package mrbind_test.mr.stdfunction; + +/** The free functions of this namespace. */ +@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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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..70106ea4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,176 @@ +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. + * 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); + 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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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); + 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/stdoptional/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..9484afc6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,179 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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)); + 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/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..fb221623 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java @@ -0,0 +1,412 @@ +package mrbind_test.mr.stdoptional; + +/** The free functions of this namespace. */ +@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(); + mrbind_test.Ffi.checkException(); + 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)); + 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_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) + { + 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_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..42f38dc8 --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..fd6226ae --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -0,0 +1,854 @@ +package mrbind_test.mr.stdsharedptr; + +/** The free functions of this namespace. */ +@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(); + mrbind_test.Ffi.checkException(); + 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")); + 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_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) + { + 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)); + 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_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) + { + 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")); + 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_int32_t _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_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) + { + 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")); + 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_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) + { + 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")); + 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_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)); + 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_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)); + 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_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) + { + 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")); + 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_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)); + 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_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)); + 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_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) + { + 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(); + 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) + { + 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(); + 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) + { + 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_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..f58ee771 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstring; + +/** The free functions of this namespace. */ +@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_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..771bdf30 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstringview; + +/** The free functions of this namespace. */ +@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_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..c109410b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -0,0 +1,243 @@ +package mrbind_test.mr.stdtuplelike; + +/** The free functions of this namespace. */ +@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")); + 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_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) + { + 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(); + mrbind_test.Ffi.checkException(); + 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(); + 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) + { + 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(); + 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) + { + 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(); + 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) + { + 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(); + 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) + { + 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")); + 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_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) + { + 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(); + 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) + { + 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_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) + { + 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..713529bc --- /dev/null +++ b/test/output_java_fixed_typedefs/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_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..d7c940ef --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -0,0 +1,629 @@ +package mrbind_test.mr.stduniqueptr; + +/** The free functions of this namespace. */ +@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_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) + { + 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_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) + { + 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")); + 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_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..cc5d5962 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java @@ -0,0 +1,90 @@ +package mrbind_test.mr.stdvariant; + +/** The free functions of this namespace. */ +@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(); + mrbind_test.Ffi.checkException(); + 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")); + 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_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) + { + 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(); + 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) + { + 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..7a9dd7ca --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java @@ -0,0 +1,98 @@ +package mrbind_test.mr.tags; + +/** The free functions of this namespace. */ +@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(); + 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_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(); + 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_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..b4716cf4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -0,0 +1,215 @@ +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")); + 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`. + * + * 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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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(); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + } + 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..a34febda --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -0,0 +1,909 @@ +package mrbind_test.mr.testsimpletypes; + +/** The free functions of this namespace. */ +@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_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); + 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_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); + mrbind_test.Ffi.checkException(); + } + 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); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.checkException(); + 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..4130e5a1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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..16527ff1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java @@ -0,0 +1,130 @@ +package mrbind_test.mr.testsizet; + +/** The free functions of this namespace. */ +@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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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..97bf307f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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..7d4f292d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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..e22882b2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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..b41c489f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.typedefsintemplates; + +/** The free functions of this namespace. */ +@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_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..8023c060 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,278 @@ +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 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()); + 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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/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..46eb26bb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,123 @@ +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 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); + } + } + + /** 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 new file mode 100644 index 00000000..be8306c8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + mrbind_test.Ffi.checkException(); + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..29f0b4bd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java @@ -0,0 +1,247 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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/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..31a70a8e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java @@ -0,0 +1,219 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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/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..07fc75cb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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)); + mrbind_test.Ffi.checkException(); + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..dea7d00d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java @@ -0,0 +1,247 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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/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..d30eccb3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java @@ -0,0 +1,219 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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()); + 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/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..82309d91 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..a9b3451e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java @@ -0,0 +1,170 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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/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..558b5a07 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..9189bb7d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java @@ -0,0 +1,170 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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/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..0be03705 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..e08f144e --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..2484f94c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java @@ -0,0 +1,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..47c0f370 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..4b9682e4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java @@ -0,0 +1,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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/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..c5f8692b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..f7b46d22 --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..c7200b13 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java @@ -0,0 +1,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..f426eb49 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..e4f41888 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java @@ -0,0 +1,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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/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..83ffff9b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..3b3a758b --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..96f3e916 --- /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,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..0d27f9df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..37e4b230 --- /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,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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/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..dc2a7f66 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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_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)); + 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) + { + 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)); + 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) + { + 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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..c4dc9811 --- /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,225 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..7b4a4302 --- /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,197 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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/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..24c12785 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java @@ -0,0 +1,382 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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()); + 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_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)); + 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_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)); + 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) + { + 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); + 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_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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + 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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..d2c89697 --- /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,148 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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/CppException.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java new file mode 100644 index 00000000..3f1347df --- /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. */ +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..a945b109 --- /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. + * + * 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..b7485a86 --- /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`. + * + * 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..ce5f8895 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java @@ -0,0 +1,361 @@ +package mrbind_test; + +/** 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 +{ + 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 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) + { + 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 + "`."); + Throwable windowsError = null; + if (IS_WINDOWS) + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } + if (ret == null) + { + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + if (windowsError != null) + e.addSuppressed(windowsError); + 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; + } + + // 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)) + { + 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; + 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 -> + { + 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); + } + }; + } + + /** + * 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); + } + + // 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 new file mode 100644 index 00000000..30d65d27 --- /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. */ +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..e2fcc56b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. */ +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)); + 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 new file mode 100644 index 00000000..aa6a1e9f --- /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`. */ +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..6f781433 --- /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`. */ +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..6c164600 --- /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`. */ +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..0f233314 --- /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`. */ +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..585f63e9 --- /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`. */ +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..18b60d1d --- /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`. */ +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..5fcaed0c --- /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`. */ +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..1c0669fd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. */ +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)); + 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 new file mode 100644 index 00000000..35518947 --- /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`. */ +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..3bce5034 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ +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)); + 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 new file mode 100644 index 00000000..bdbee631 --- /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`. */ +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..e6078ca4 --- /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`. */ +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..d332e12e --- /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`. */ +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..d6f17c03 --- /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`. */ +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..aead1bba --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,80 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. */ +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_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)); + 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_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 new file mode 100644 index 00000000..a2a94fa6 --- /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`. */ +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..7269189d --- /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`. */ +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..3542c3c5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,204 @@ +package mrbind_test.ffi.MR; + +/** 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() {} + + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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_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)); + 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)); + 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 new file mode 100644 index 00000000..21dc4403 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1373 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. */ +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_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 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)); + 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 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)); + 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_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_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_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)); + 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 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)); + 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 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 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)); + 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_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_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 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_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)); + 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 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)); + 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 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..f66110e9 --- /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`. */ +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..2f792da8 --- /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`. */ +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..be854c6a --- /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`. */ +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..516cd872 --- /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`. */ +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..6cd6a94f --- /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`. */ +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..a6c1db34 --- /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`. */ +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..cf32410c --- /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`. */ +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..e3d4041b --- /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`. */ +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..dda299b1 --- /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`. */ +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..80b05b20 --- /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`. */ +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..e429b601 --- /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`. */ +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..663f9224 --- /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`. */ +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..ad966fcf --- /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`. */ +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..c45226cd --- /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`. */ +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..ce5bdcde --- /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`. */ +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..9b9c285b --- /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`. */ +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..6d674e77 --- /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`. */ +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..6e489658 --- /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`. */ +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..382ecaaa --- /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`. */ +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..d6880507 --- /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`. */ +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..1277fca9 --- /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`. */ +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..88ec684d --- /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`. */ +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..6f7d572c --- /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`. */ +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..b8bef6bf --- /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`. */ +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..9484cdac --- /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`. */ +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..c3210bb9 --- /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`. */ +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..b4897179 --- /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`. */ +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..160182b4 --- /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`. */ +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..4fc442e3 --- /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`. */ +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..84f400d6 --- /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`. */ +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..ebafd4fd --- /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`. */ +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..ae94ef2b --- /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`. */ +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..65430f60 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,42 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ +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)); + 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 new file mode 100644 index 00000000..97fc13c5 --- /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`. */ +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..6a3b207f --- /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`. */ +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..9f9b2230 --- /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`. */ +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..cfb57924 --- /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`. */ +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..d4b178fa --- /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`. */ +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..d757cff6 --- /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`. */ +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..08f9e324 --- /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`. */ +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..61ef70a8 --- /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`. */ +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..6f7a4b4d --- /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`. */ +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..37c3d7cd --- /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`. */ +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..f2647cfe --- /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`. */ +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..ad7f8e0e --- /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`. */ +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..5a0646eb --- /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`. */ +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..19af44c7 --- /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`. */ +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..abf67648 --- /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`. */ +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..f60b8bd9 --- /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`. */ +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..fd04e97c --- /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`. */ +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..dd711b89 --- /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`. */ +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..6d9c4748 --- /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`. */ +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..bc47f784 --- /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`. */ +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..f36233ae --- /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`. */ +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..07834cce --- /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`. */ +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..06418ef3 --- /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`. */ +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..11d4688d --- /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`. */ +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..81e49b6b --- /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`. */ +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..89e02838 --- /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`. */ +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..a7ce53bb --- /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`. */ +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..5bc432a6 --- /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`. */ +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..5956bf88 --- /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`. */ +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..eeb4a594 --- /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`. */ +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..906da660 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..8bed5155 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..9d3583fc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..f82513c0 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b99a0602 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int`. */ +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)); + 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 new file mode 100644 index 00000000..eb7038ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3b3a2717 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3a4a10d6 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..92602f42 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b0f239d1 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..d3299453 --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..b2be91d1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. */ +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)); + 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 new file mode 100644 index 00000000..31e86a6c --- /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,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..13fc74fa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..3b6161ae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** 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() {} + + 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)); + 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 new file mode 100644 index 00000000..6f238a58 --- /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`. */ +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..80aeb0e6 --- /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`. */ +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..b2b9a292 --- /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`. */ +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..87b9eb08 --- /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`. */ +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..56ecec09 --- /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`. */ +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..51c5e679 --- /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`. */ +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..314caf03 --- /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`. */ +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..4fa3463f --- /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`. */ +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..f48b4e3a --- /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`. */ +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..b6ac1fd1 --- /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`. */ +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..15cae432 --- /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`. */ +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..3282e9d2 --- /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`. */ +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..a4186168 --- /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`. */ +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..2c7ec0ae --- /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`. */ +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..ee11b710 --- /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`. */ +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..b339627b --- /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`. */ +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..d70ac82e --- /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`. */ +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..5ea915b4 --- /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`. */ +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..9a6495e0 --- /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`. */ +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..5656eb09 --- /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`. */ +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..00c7ce70 --- /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`. */ +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..08547589 --- /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`. */ +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..1a1ad1c2 --- /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`. */ +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..38392a76 --- /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`. */ +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..677b84ae --- /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`. */ +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..b1da301a --- /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`. */ +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..1263684d --- /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`. */ +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..95c94dc8 --- /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`. */ +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..3145d379 --- /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`. */ +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..dbc896b8 --- /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`. */ +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..cccfe2cb --- /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`. */ +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..a60b7b5b --- /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`. */ +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..84718b15 --- /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`. */ +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..25087115 --- /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`. */ +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..274d1a0d --- /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`. */ +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..3c394905 --- /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`. */ +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..79cc6ffd --- /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`. */ +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..19805dd4 --- /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`. */ +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..cb1ba328 --- /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`. */ +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..bc74688d --- /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`. */ +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..8af41b39 --- /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`. */ +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..98d5526b --- /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`. */ +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..20832f16 --- /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`. */ +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..ff6f8f39 --- /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`. */ +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..1a9103ba --- /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`. */ +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..1c03b1a4 --- /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`. */ +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..dd077da1 --- /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`. */ +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..7b0b77d8 --- /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`. */ +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..fc26ab1a --- /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`. */ +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..14953c19 --- /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`. */ +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..a9f0271f --- /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`. */ +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..2887abfd --- /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`. */ +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..aa5ddfb3 --- /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`. */ +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..be5b9c6e --- /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`. */ +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..77b66045 --- /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`. */ +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..336ea3bf --- /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`. */ +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..c0356ab6 --- /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`. */ +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..97fb581a --- /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`. */ +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..4764212a --- /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`. */ +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..743c7ec5 --- /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`. */ +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..5e31e992 --- /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`. */ +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..a371e80d --- /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`. */ +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..850b5d53 --- /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`. */ +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..378ae9f1 --- /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`. */ +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..6be24221 --- /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`. */ +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..90a276f0 --- /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`. */ +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..18c7fb3e --- /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`. */ +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..78817e69 --- /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`. */ +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..49d7c0d2 --- /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`. */ +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..627943b1 --- /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`. */ +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..4792ec2b --- /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`. */ +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..c66b1bdd --- /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`. */ +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..5197e968 --- /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`. */ +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..1f41462b --- /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`. */ +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..f538edbc --- /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`. */ +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..5aed4634 --- /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`. */ +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..f03eb910 --- /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`. */ +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..05948578 --- /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`. */ +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..cc6f5b1f --- /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`. */ +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..db2104c9 --- /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`. */ +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..2f233c54 --- /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`. */ +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..efd501e3 --- /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`. */ +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..29ef947c --- /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`. */ +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..1e87dd24 --- /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`. */ +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..79f6018a --- /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`. */ +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..eb25b044 --- /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`. */ +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..cd63cb4b --- /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`. */ +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..704835c9 --- /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`. */ +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..94d8fa56 --- /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`. */ +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..70b1b304 --- /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`. */ +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..5c8bef1d --- /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`. */ +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..5400a8f1 --- /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`. */ +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..f3ba497b --- /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`. */ +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..86a7b033 --- /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`. */ +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..c525dc14 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java @@ -0,0 +1,154 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java new file mode 100644 index 00000000..651602c6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..28ed7490 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java @@ -0,0 +1,126 @@ +package mrbind_test.mr; + +/** The free functions of this namespace. */ +@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_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..6d96c068 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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 new file mode 100644 index 00000000..0540f87b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,143 @@ +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")); + 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::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")); + 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); + 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 new file mode 100644 index 00000000..a55dd2c6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e35d3ed0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..536ba196 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,110 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..18e21c69 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,211 @@ +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 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()); + 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_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(); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + } + 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..49732040 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.adjustingnames; + +/** The free functions of this namespace. */ +@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_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..4dd5db2a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,227 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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)); + 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/aggregates/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java new file mode 100644 index 00000000..fa2565ef --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..5698c344 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,497 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..0934c0a2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,542 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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); + 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/aggregates/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..9dc267ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,592 @@ +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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..519a6f4d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..90d91fef --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d46a312d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,153 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..04210068 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,189 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a8d4ec07 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,150 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..8d5bf1eb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..5bff36d9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..200c7d58 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f48fb98c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..81ce9f6f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,152 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a0cbdaf8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,149 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..135e73e7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,191 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..c6211ec0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,170 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..5760a6a2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..7878f307 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,291 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..4ea2c288 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,281 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..06120dd8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,188 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..be5c2553 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,297 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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::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 new file mode 100644 index 00000000..79b2d076 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..e5d2d3e6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,230 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..824300f1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,279 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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..ea4b3ce8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,315 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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 new file mode 100644 index 00000000..0b575e39 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,315 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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 new file mode 100644 index 00000000..93b7c3d2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,301 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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_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 new file mode 100644 index 00000000..7134f071 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..58b3e2a5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..574eee03 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,301 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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..07aa1002 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,340 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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 new file mode 100644 index 00000000..5fb9ca1d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,379 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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) + { + 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 new file mode 100644 index 00000000..ba9d1fb8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java @@ -0,0 +1,2680 @@ +package mrbind_test.mr.cs; + +/** The free functions of this namespace. */ +@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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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.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) + { + 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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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")); + 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_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..8b73fe8e --- /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,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_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..a0963b96 --- /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,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_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..8cfda3a9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..cc703535 --- /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,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_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..07fc84dd --- /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,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_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..af94dce1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8b9ffc45 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..53c22c7d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..38e6e76a --- /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,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_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..46202fa7 --- /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,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_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..842044db --- /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,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_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..b8083ade --- /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,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_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..13aa7719 --- /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,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_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..30a2235d --- /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,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_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..7383c069 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..41a814d0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..856d1043 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..222747a8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e484ab62 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..570af0ba --- /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,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..d5dd21bc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..df121736 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..6d539445 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..a17f9f98 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..02a31d42 --- /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,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..39a43f38 --- /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,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..1f2b58d7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -0,0 +1,231 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..35113571 --- /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,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..55c1d17d --- /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,232 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..8c6de0c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,228 @@ +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); + } + } + + /** 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_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..0071ea5b --- /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,229 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..14e198eb --- /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,228 @@ +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); + } + } + + /** 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_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..521708af --- /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,229 @@ +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); + } + } + + /** 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_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..bbfa5193 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..87580369 --- /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,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_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..67a27b6e --- /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,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_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..55bf0b94 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..77efe0b5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..6c653c07 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..316caf47 --- /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,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_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..c5049742 --- /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,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_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..8dae40fb --- /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,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_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..e82606ce --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8aaecc4a --- /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,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_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..4bf2faeb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..45b15283 --- /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,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_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..c0e6262f --- /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,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_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..0d8d6aa3 --- /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,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_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..f6ebf710 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ac379b98 --- /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,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_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..9d4ba42d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..146ed89a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..9efcb155 --- /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,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_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..af0326b2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..97bafc7a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..83604e8b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c799aa43 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..9dfd4d60 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d73ec4ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c1908c81 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c759c355 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..3a62455c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..3276872d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..4e677ea0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e78353fa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ba3496bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..620ab1cf --- /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,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.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")); + 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.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) + { + 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")); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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_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..2781e8ec --- /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,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_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..1cc4aa66 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..4e419385 --- /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,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_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..f44620bd --- /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,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_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..9d7c77cb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..24659c6a --- /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,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_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..337b717e --- /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,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_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..582f8e4b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8d32adf3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..48621f01 --- /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,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_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..338b722d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..2ec4fc19 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b5e1d1da --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..14862712 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..eed523a3 --- /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,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_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..520b3fcb --- /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,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_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..9757c009 --- /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,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..6b3e24b4 --- /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,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..ded2321e --- /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,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..4f78dc96 --- /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,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_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..77c26747 --- /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,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..73d9bd0f --- /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,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_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..b164cd32 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d1457c40 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java @@ -0,0 +1,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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); + } + } + + /** + * 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..8d44af77 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java @@ -0,0 +1,413 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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); + } + } + + /** + * 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()); + 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_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()); + 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_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()); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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)); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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_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)); + 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_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)); + mrbind_test.Ffi.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_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()); + 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_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")); + mrbind_test.Ffi.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_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..5ccd29b4 --- /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,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_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..525b196c --- /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,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_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..fc76f28a --- /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,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_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..32760b4a --- /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,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_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..32d374d6 --- /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,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_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..9636c178 --- /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,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_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..cbab05ef --- /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,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_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..f8c7e3fa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..3e09d015 --- /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,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_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..6c4c5c3e --- /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,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_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..62f7fd10 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..6bd14ce2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8785395e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..a5b79bf2 --- /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,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_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..e1f89652 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f5a89865 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..38b6d2a2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..33b85c6e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8edc1eee --- /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,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_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..71b5a4f3 --- /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,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_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..2727d2f7 --- /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,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_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..f8a53944 --- /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,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_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..56219490 --- /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,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_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..a03badfa --- /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,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_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..589991cc --- /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,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_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..eaaa1c75 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..afed8519 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..eb36d206 --- /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,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_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..179979e1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..145edfc4 --- /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,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_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..86b761ad --- /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,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_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..2a04d900 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..66f64e9c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f82d6439 --- /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,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_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..7f7a0983 --- /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,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_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..f2238df6 --- /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,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_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..1ed24b2d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..719037f6 --- /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,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_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..8dca84d8 --- /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,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_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..1e8f792e --- /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,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_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..71f0330b --- /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,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_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..f7672c58 --- /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,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_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..9a58082b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..fb125270 --- /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,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_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..a0afe53a --- /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,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_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..da707bac --- /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,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_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..484b26bc --- /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,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_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..d0f5d4bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..783af965 --- /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,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_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..7f807dbe --- /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,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_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..80193b0e --- /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,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_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..e68840b7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..cbcb2b47 --- /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,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_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..de28c6d9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..4aa4984a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..a24d889e --- /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,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_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..8b129c0c --- /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,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_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..53b0413c --- /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,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_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..38686116 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..409b31fe --- /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,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_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..65ea4c1d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..24645982 --- /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,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_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..36ffd607 --- /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,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_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..329a8858 --- /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,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_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..551e1968 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..2269bec7 --- /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,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_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..6ee3b0fe --- /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,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_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..241eb9ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..d9cc8cc7 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..12dc1481 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..ffa49af7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..435e96b6 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..73714980 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..3c5de01f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c97bba96 --- /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,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_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..4f48ab3f --- /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,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_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..a3d8d80c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f3f4e76e --- /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,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_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..d483470d --- /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,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_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..60eadc8a --- /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,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_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..9e3ec838 --- /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,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_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..3da632ea --- /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,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_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..b625a6fa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..2c760966 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_int64_t_clear()`. + */ + 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) + { + 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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + 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) + { + 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()); + 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_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()); + 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) + { + 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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..d5a18581 --- /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,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..2bbaa8e6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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_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..b6599087 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ee3bf5ef --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c1dbdebe --- /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,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_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..99c25263 --- /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,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_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..1839d460 --- /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,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_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..8aadadf7 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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); + 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.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) + { + 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); + 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.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); + } + 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()); + 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.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); + } + 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()); + 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.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); + } + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..21b6cda6 --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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) + { + 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()); + 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.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) + { + 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()); + 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.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) + { + 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..4169e5bf --- /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,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.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(); + 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.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) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another 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")); + mrbind_test.Ffi.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.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); + } + 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()); + 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.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) + { + 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); + 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_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..a10fb415 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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); + 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_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); + 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_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()); + 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_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()); + 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_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); + 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_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); + 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_uint64_t_clear()`. + */ + 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) + { + 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()); + 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_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); + 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_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()); + 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_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); + mrbind_test.Ffi.checkException(); + 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); + 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_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()); + 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) + { + 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()); + 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_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()); + 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) + { + 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()); + 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_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()); + 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_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()); + 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_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); + 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_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()); + 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_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); + 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_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); + 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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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); + mrbind_test.Ffi.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_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")); + mrbind_test.Ffi.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_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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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")); + mrbind_test.Ffi.checkException(); + return __ret; + } + 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..f3d4ca88 --- /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,220 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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")); + 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_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()); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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); + 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_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..fe879d25 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -0,0 +1,192 @@ +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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.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_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()); + 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_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()); + 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_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()); + 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_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); + 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/csharp/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java new file mode 100644 index 00000000..6114e161 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c2eafab4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..21aaece3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,484 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + 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::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()); + 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 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(); + 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::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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..25e59795 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,338 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..73cf5bd8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,294 @@ +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.H2.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.H2.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.H2.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); + } + } + + /** 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 new file mode 100644 index 00000000..005fdf0a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d64099a9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..12a9c63c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,360 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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(); + mrbind_test.Ffi.checkException(); + 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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); + } + } +} 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..c497434f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,359 @@ +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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.checkException(); + } + 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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)); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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_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..191b5b42 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,338 @@ +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(); + mrbind_test.Ffi.checkException(); + 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); + 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::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(); + mrbind_test.Ffi.checkException(); + 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))); + 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::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(); + 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 `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(); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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); + 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::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()); + mrbind_test.Ffi.checkException(); + 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))); + 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::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()); + 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::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()); + 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); + } + 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..0d2b8b91 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e1e67bea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d557d73e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..634606c7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..a773de34 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..6a486e80 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..310545d4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b7177555 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..70ab16ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..af052049 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..6be932e9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..bb4e4e83 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ad1d667e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..430f175b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d0c4f3c0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..678dc30b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e7fc2ecf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..2847016a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..df4f9da4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -0,0 +1,84 @@ +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`. + * + * 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.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) + { + 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..90e54ffc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H3.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.H3.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.H3.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.H3.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_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..fcad7b57 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,484 @@ +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); + } + } + + /** 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 new file mode 100644 index 00000000..c7a31e5a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7418 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. */ +@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))); + mrbind_test.Ffi.checkException(); + 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`. + * + * 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`. + * + * 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*`. + * + * 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`. + * + * 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`. + * + * 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*`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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_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..5883f28f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,466 @@ +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); + } + } + + /** 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_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..ccc9dfd1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,200 @@ +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")); + 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::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_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..9fac5969 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,199 @@ +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")); + 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::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_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..222695d9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..12a31479 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..fab05d1a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..550cf599 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ad9c1ba9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..9bab68a8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c9f2631b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d345a99d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,198 @@ +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()); + 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); + } + } + + /** + * 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); + 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/csharp/IndexerB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..4961db4e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,254 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..5ae4eaea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b2f3e28f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..bfc1172c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..856d34c5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,240 @@ +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`. + * + * 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`. + * + * 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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..c0f3717f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..500f3a32 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..38e8a875 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,148 @@ +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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..713a2a0f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H4.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`. + * + * 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`. + * + * 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.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); + } + 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.H4.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); + 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..176f44d3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H4.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.H4.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.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) + { + 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.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); + } + 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.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); + } + 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.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); + } + 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.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); + } + 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.H4.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); + 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..7332f17f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H4.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.H4.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.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); + } + 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.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); + } + 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.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); + } + 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..af968529 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..d55115ef --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..2c9f8308 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,245 @@ +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()); + mrbind_test.Ffi.checkException(); + 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); + 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/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..bc28814d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,176 @@ +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()); + mrbind_test.Ffi.checkException(); + 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); + 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/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..9780bb85 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..72d0d2b5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,223 @@ +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()); + 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); + } + } + + /** + * 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); + 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/csharp/LifetimesB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..d11eb85a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,255 @@ +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`. + * + * 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`. + * + * 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*`. + * + * 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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..cac6fc8d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,182 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..5125b7e6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,370 @@ +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`. + * + * 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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..d0e24f9a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,234 @@ +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 = 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(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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..c770217a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,251 @@ +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()); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..ed36e0b6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..5509b45d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..0a0ec816 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..5386faed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..bce36943 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e39518cb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..7a71aae8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..dbe7d65e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f2e53f39 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..766167ac --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..885fd8ae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..43a4ebbe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e7f51184 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H5.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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..e956e60f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H5.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.H5.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.H5.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.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); + } + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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..49d64e51 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,107 @@ +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.H5.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.H5.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.H5.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); + } + } + + /** + * 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.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); + } + 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..cc394ebd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,184 @@ +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.H5.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()); + 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); + } + } + + /** + * 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)); + 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/csharp/SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..aafa9ad3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,239 @@ +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()); + 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); + } + } + + /** + * 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)); + 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) + { + 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 new file mode 100644 index 00000000..86d197a8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..a7236f82 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,184 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/csharp/SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..71beca44 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,259 @@ +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()); + 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); + } + } + + /** + * 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)); + 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) + { + 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/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..f5d03e8b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..253abbaf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..7f451251 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..9c934217 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f3ddc8ec --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..45f47587 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..74aa8cfd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..bae8e89f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..946f2c50 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..caa136c8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..59723c0f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..ea551ffc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..3a75ea52 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..bbd7bae6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..6d4cb4de --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..19f33761 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..aa25f431 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..403c3c8a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..376149c4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f2cc1155 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c8b66d87 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..3524556c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..df020537 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,529 @@ +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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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(); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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)); + 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::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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * 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(); + 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); + } + } + + /** + * < 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()); + 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); + } + } + + /** + * < 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); + 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::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()); + 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); + } + } + + /** + * 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()); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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)); + 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::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()); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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()); + 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_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..23d2ceca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.H6.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.H6.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.H6.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.H6.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_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..60d60d6e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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.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) + { + 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.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) + { + 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.H6.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.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) + { + 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.H6.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.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) + { + 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.H6.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.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) + { + 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.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) + { + 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.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) + { + 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.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) + { + 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.H6.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.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) + { + 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_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..05c366e7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..d2fc362c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,511 @@ +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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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); + } + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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")); + mrbind_test.Ffi.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); + } + } +} 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..ea9816a3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,104 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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..1c79ab13 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..e4e6f70c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..91936354 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..441125ac --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.customprefnames; + +/** The free functions of this namespace. */ +@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_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..d00a457b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b2de2931 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..be0112cc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..fdc25e1a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c5841177 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.deprecation; + +/** The free functions of this namespace. */ +@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_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..98f62931 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..22998e45 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** The free functions of this namespace. */ +@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_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..df7dfe44 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** The free functions of this namespace. */ +@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_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..b9a9e4d7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c9f2e647 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java @@ -0,0 +1,54 @@ +package mrbind_test.mr.iostream; + +/** The free functions of this namespace. */ +@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_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..c86649bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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`. + * + * 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`. + * + * 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()); + 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); + } + } + + /** + * 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); + 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/lifetimeinference/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..0af5d130 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,174 @@ +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()); + 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); + } + } + + /** + * 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); + 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/lifetimeinference/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java new file mode 100644 index 00000000..8607e848 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java @@ -0,0 +1,108 @@ +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`. + * + * 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_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..182cbff4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -0,0 +1,100 @@ +package mrbind_test.mr.lifetimeinference; + +/** The free functions of this namespace. */ +@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")); + 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`. + * + * 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`. + * + * 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`. + * + * 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_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..e96df36f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,98 @@ +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(); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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..80f56061 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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")); + 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()); + mrbind_test.Ffi.checkException(); + 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..c23bb2ae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java @@ -0,0 +1,95 @@ +package mrbind_test.mr.matchinglayout; + +/** The free functions of this namespace. */ +@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_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..8cf13345 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,249 @@ +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(); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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()); + 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); + } + } + + /** + * 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); + 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::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()); + 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); + } + } + + /** + * 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()); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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(); + mrbind_test.Ffi.checkException(); + 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..701c37e6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b50cec21 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..51db6dd5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,230 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } + + /** + * 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()); + 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) + { + 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); + 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/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..4253b30d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..83f8e16d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,128 @@ +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")); + 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::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_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..dcd5cf64 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -0,0 +1,151 @@ +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")); + 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::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_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..d206956d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -0,0 +1,181 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** The free functions of this namespace. */ +@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_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..abcdba9a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..1561199c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..8aa8c8e3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f887d23c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..4b146425 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java @@ -0,0 +1,1095 @@ +package mrbind_test.mr.overloadedops; + +/** The free functions of this namespace. */ +@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_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..bca7a875 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java @@ -0,0 +1,263 @@ +package mrbind_test.mr.overloads; + +/** The free functions of this namespace. */ +@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_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..140351a0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.phmap; + +/** The free functions of this namespace. */ +@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_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..9e86234c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..14d92f69 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,153 @@ +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()); + 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); + } + } + + /** + * 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")); + mrbind_test.Ffi.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); + } + } +} 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..35b84c99 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.signaturefilters; + +/** The free functions of this namespace. */ +@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_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..dcb3a824 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,159 @@ +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(); + 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); + } + } + + /** + * 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); + mrbind_test.Ffi.checkException(); + } + 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..21eb8fd7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..79818ac9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java @@ -0,0 +1,783 @@ +package mrbind_test.mr.stdcontainers; + +/** The free functions of this namespace. */ +@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_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..97014ce9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..7ebb4887 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..eb465f1d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java @@ -0,0 +1,241 @@ +package mrbind_test.mr.stdexpected; + +/** The free functions of this namespace. */ +@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_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..b6f01f2a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.stdfilesystem; + +/** The free functions of this namespace. */ +@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_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..e4c0462f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,179 @@ +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()); + 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); + } + } + + /** + * 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)); + 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/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..29a235ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java @@ -0,0 +1,184 @@ +package mrbind_test.mr.stdfunction; + +/** The free functions of this namespace. */ +@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_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..963d89f2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,174 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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); + 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/stdoptional/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..9484afc6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,179 @@ +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")); + 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::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")); + mrbind_test.Ffi.checkException(); + 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()); + 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); + } + } + + /** + * 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)); + 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/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..7d0332e7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java @@ -0,0 +1,412 @@ +package mrbind_test.mr.stdoptional; + +/** The free functions of this namespace. */ +@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_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..42f38dc8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..c6fccd3b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -0,0 +1,854 @@ +package mrbind_test.mr.stdsharedptr; + +/** The free functions of this namespace. */ +@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_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..f58ee771 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstring; + +/** The free functions of this namespace. */ +@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_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..771bdf30 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstringview; + +/** The free functions of this namespace. */ +@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_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..5940ada2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -0,0 +1,243 @@ +package mrbind_test.mr.stdtuplelike; + +/** The free functions of this namespace. */ +@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_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..713529bc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..17db6080 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -0,0 +1,629 @@ +package mrbind_test.mr.stduniqueptr; + +/** The free functions of this namespace. */ +@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_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..f77b9b6c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java @@ -0,0 +1,90 @@ +package mrbind_test.mr.stdvariant; + +/** The free functions of this namespace. */ +@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_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..64da91ac --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java @@ -0,0 +1,98 @@ +package mrbind_test.mr.tags; + +/** The free functions of this namespace. */ +@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_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..3f45f9ea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -0,0 +1,215 @@ +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")); + 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`. + * + * 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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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()); + 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_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(); + mrbind_test.Ffi.checkException(); + 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); + mrbind_test.Ffi.checkException(); + } + 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..f5858c5f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -0,0 +1,909 @@ +package mrbind_test.mr.testsimpletypes; + +/** The free functions of this namespace. */ +@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::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); + 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_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); + 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_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); + 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_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..4130e5a1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.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_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(); + 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_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")); + 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_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")); + mrbind_test.Ffi.checkException(); + 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()); + 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_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..16527ff1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java @@ -0,0 +1,130 @@ +package mrbind_test.mr.testsizet; + +/** The free functions of this namespace. */ +@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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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); + 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_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); + 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_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")); + mrbind_test.Ffi.checkException(); + 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..c1b41f84 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..36c829bc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b14e376e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..b41c489f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.typedefsintemplates; + +/** The free functions of this namespace. */ +@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_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..9130a7b2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,276 @@ +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(); + 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); + } + } + + /** + * 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); + 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 `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()); + 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); + } + } + + /** + * 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); + 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/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..345eeea1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,291 @@ +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()); + 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); + } + } + + /** + * 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); + 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::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(); + 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); + } + } + + /** + * 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); + 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 new file mode 100644 index 00000000..9c2ee743 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..1c8e1558 --- /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,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_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..8bf8a2e2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..4c1077dc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..9a901bf0 --- /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,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_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..dd5553fa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..5068ce28 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..a5e973ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..da589d67 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..361138b7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..37ec1c43 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..93e1be81 --- /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,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_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..7d9268a6 --- /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,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_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..88733495 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..0687c782 --- /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,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_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..7d56c333 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..f21f8e62 --- /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,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_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..58dfc6f1 --- /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,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_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..42bf494d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..808ec2ae --- /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,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_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..f866f2b6 --- /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,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_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..6c596b4a --- /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,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_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..664cf73c --- /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,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_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..6f63683d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..05ab6320 --- /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,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_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..73d88f2b --- /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,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_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..88870437 --- /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,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_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..0cba694d --- /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,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_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..51cf7522 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/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_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..899e48e0 --- /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,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/run_java/Main.java b/test/run_java/Main.java new file mode 100644 index 00000000..553ac4d9 --- /dev/null +++ b/test/run_java/Main.java @@ -0,0 +1,141 @@ +// 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_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; + +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"); + + // `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."); + } +}