Re: C++ wrappers
Posted: Tue Jan 30, 2018 8:37 pm
Korken,
What's the reason for declaring most of the classes final? IMHO it takes out the elegancy from interfacing ChibiOS with C++. For example, with the old wrapper you could derive a class from BaseStaticThread, define a main() member function and call any thread-related function implicitly against the this pointer. Now you have to store a reference to the Thread object and prefix all calls with that member. For now I don't see a reason why these classes need to be final. Without that you would still have the freedom to choose between inheritance or referencing.
Thanks, Szabi
What's the reason for declaring most of the classes final? IMHO it takes out the elegancy from interfacing ChibiOS with C++. For example, with the old wrapper you could derive a class from BaseStaticThread, define a main() member function and call any thread-related function implicitly against the this pointer. Now you have to store a reference to the Thread object and prefix all calls with that member. For now I don't see a reason why these classes need to be final. Without that you would still have the freedom to choose between inheritance or referencing.
Thanks, Szabi