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

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

namespace djinni_generated {

NativeImgData::NativeImgData() = default;

NativeImgData::~NativeImgData() = default;

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

auto NativeImgData::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
    ::djinni::JniLocalScope jscope(jniEnv, 4);
    assert(j != nullptr);
    const auto& data = ::djinni::JniClass<NativeImgData>::get();
    return {::djinni::I64::toCpp(jniEnv, jniEnv->GetLongField(j, data.field_mFrameId)),
            ::djinni::I64::toCpp(jniEnv, jniEnv->GetLongField(j, data.field_mTimestamp)),
            ::djinni::I64::toCpp(jniEnv, jniEnv->GetLongField(j, data.field_mExposureTime))};
}

}  // namespace djinni_generated
