Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindings to pure virtual functions are not generated #1400

Closed
Neurrone opened this issue Sep 25, 2018 · 1 comment
Closed

Bindings to pure virtual functions are not generated #1400

Neurrone opened this issue Sep 25, 2018 · 1 comment

Comments

@Neurrone
Copy link

Hi,

I'm atempting to use a C++ library that makes extensive use of virtual functions, but the other parameters to these virtual functions are simple. The general usage pattern is to create an instance of an object with a function such as

API_EXPORT TBE::EngineError TBE_CreateAudioEngine(TBE::AudioEngine *&engine,
                                                     TBE::EngineInitSettings initSettings = TBE::EngineInitSettings());

Then, use the -> operator to call the required methods.

The AudioEngine class has the following definition:

class AudioEngine
   {
    public:
      virtual ~AudioEngine() {}

      virtual EngineError start() = 0;
      virtual EngineError suspend() = 0;
      virtual void setListenerRotation(TBVector forwardVector, TBVector upVector) = 0;

      ...

However, the functions inside this interface are completely missing from the generated bindings.

@emilio
Copy link
Contributor

emilio commented Sep 25, 2018

Yeah, this is known, see #1143, #478 and #27 for discussion about the difficulties of it.

#1143 should be easy enough, and maybe even without overloads. But needs somebody to do the job :). I can mentor but can't promise I'll have the time to implement myself.

Closing as a dupe of those. Thanks!

@emilio emilio closed this as completed Sep 25, 2018
mickvangelderen added a commit to mickvangelderen/openvr-sys-rust that referenced this issue Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants