bytedeco/javacpp

Parser mapping

Open

#714 建立於 2023年10月2日

在 GitHub 查看
 (12 留言) (0 反應) (0 負責人)Java (620 fork)batch import
help wantedquestion

倉庫指標

Star
 (4,279 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I have a question about the javacpp parser or rather how to map this properly. I read up on the mapping recipes but I either missed it, it went over my head or it isn't there(probably one of the first two). I have a function that pretty much just allocates an object on the heap and returns the pointer to that object. The function looks like this :

DLLEXPORT lve::WindowContext* VideoContext::alloc_window_context();

When I give the parser the header it generates a class that extends FunctionPointer called Int_Alloc_window_context and the function ends up looking like this :

public native Int_Alloc_window_context alloc_window_context();

how can I tell it to make the return type WindowContext?

貢獻者指南