🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Application Class Implementing interface

Started by
12 comments, last by MindOfTony 1 week, 1 day ago

I want script and applications to be able to implement the c++ interfaces.

Here's my scenario all over again. I have a file and compute shader buffer classes, these can both be written to by any object that can be represented as a byte stream, so the file and compute_buffer implement the IWriteableBuffer interface, these are application classes, the IWriteableBuffer probably has a method write that takes in a primitive or any bytes like object. then there's types like Vector2 that are registered by the application that can also be serialized, and also script specific types like a SaveData structure, hence the interface ISerializable that represents any object that can be represented as a bytes like and be written to a butter, so I need interfaces that both app types and script types can implement

Advertisement

I explained that in my previous response. It is simply not possible to have both script and application implement the same interface. C++ interface and Script interface are not compatible and interexchangeable, as the script doesn't generate native code as C++ does.

I gave you some options in that response. I understand none are the ideal solution that you're looking for, but that is all I can offer now.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I think I understand, thank you for your time

Advertisement