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?

贡献者指南