bytedeco/javacpp

Problem with vector of nested class

Open

#494 opened on Jun 3, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Java (620 forks)batch import
enhancementhelp wantedquestion

Repository metrics

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

Description

Here's a demo

#include <vector>
class Out {
    public:
        class Inner {
            public:
        };
};
        infoMap.put(new Info("std::vector<Out::Inner>").pointerTypes("InnerVector").define());

Here is InnerVector.java generated

@Name("std::vector<Out::Inner>") @Properties(inherit = ...)
public class InnerVector extends Pointer {
    static { Loader.load(); }
    /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
    public InnerVector(Pointer p) { super(p); }
    public InnerVector(Inner value) { this(1); put(0, value); }
    public InnerVector(Inner ... array) { this(array.length); put(array); }

Inner in generated code should be changed to Out.Inner Error messages

cannot find symbol
[ERROR]   symbol:   class Inner

Contributor guide