// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from varnames.djinni

#include "NativeVarnameRecord.hpp"  // my header
#include "Marshal.hpp"

namespace djinni_generated {

NativeVarnameRecord::NativeVarnameRecord() = default;

NativeVarnameRecord::~NativeVarnameRecord() = default;

auto NativeVarnameRecord::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef<JniType> {
    const auto& data = ::djinni::JniClass<NativeVarnameRecord>::get();
    auto r = ::djinni::LocalRef<JniType>{jniEnv->NewObject(data.clazz.get(), data.jconstructor,
                                                           ::djinni::get(::djinni::I8::fromCpp(jniEnv, c._field_)))};
    ::djinni::jniExceptionCheck(jniEnv);
    return r;
}

auto NativeVarnameRecord::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
    ::djinni::JniLocalScope jscope(jniEnv, 2);
    assert(j != nullptr);
    const auto& data = ::djinni::JniClass<NativeVarnameRecord>::get();
    return {::djinni::I8::toCpp(jniEnv, jniEnv->GetByteField(j, data.field_mField))};
}

}  // namespace djinni_generated
