Hello all,
I am writing an app that needs to store data in the cloud. I am thinking about using the MEGA API. The API is written in C++.
Here is an example app that matches my needs. I am not so sure how to integrate this object-oriented C++ code into my Nim project.
I can see in the Manual that I can pretty easily bind to C++ APIs. However, is it possible to subclass a C++ class and override its virtual functions?
Also, if anyone has experience with the MEGA API, do you have any tips? Thanks!
I'm not sure, but you may be able to achieve this (overriding virtual C++ functions) by some ugly emission of raw c++ code.
Here's an example:
https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
Yikes. Perhaps it would be better to make a C++ shared library to abstract the OO away.
(How ironic: the abstraction became the obstacle :/)