bytedeco/javacpp

Parser mapping

Open

#714 opened on Oct 2, 2023

View on GitHub
 (12 comments) (0 reactions) (0 assignees)Java (620 forks)batch import
help wantedquestion

Repository metrics

Stars
 (4,279 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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?

Contributor guide