-
Thank you for your generosity in sharing this fantastic library. Generally, I believe that libraries have both public and private APIs. Public APIs are typically carefully managed, and any changes are announced as breaking changes. Is there an easy way to determine whether a certain class/method included in Tracktion Engine is public or private? Specifically, when incorporating Tracktion Engine into an application, is there clear documentation available for application developers to know which classes/methods to use? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
For example, when wanting to use AudioFormatManager, how should an application developer determine whether they should initialize it using its constructor or use Engine's getAudioFormatManager? If using the constructor is discouraged, I believe we can classify this constructor as a private API. |
Beta Was this translation helpful? Give feedback.
-
The answer is "it depends". The library is constructed in such a way that you can either use it as a full framework stemming from the creation of an Engine object or several bits on their own. Generally though I'd say you probably want to create an Engine and use the functions to retrieve objects from there so they use the same Engine settings (temp folders etc). If there are truly private classes in the engine they tend to be inaccessible or clearly marked as such. You generally want to just include |
Beta Was this translation helpful? Give feedback.
-
Thank you for the clear response. As you suggested, I will include only I have a few feature requests in mind. It would be helpful if there were a way to list classes and methods that can be accessed from outside the engine, typically from the GUI. I believe it can be archieved without narrowing down the available APIs. This could be achieved through the implementation of a facade, header splitting, or the definition of functions similar to those found in |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion. The problem with this approach is that we can only cover so much of the API and inevitable users will want more and more underlying functionality exposed. We take this approach to some extent in We try very hard not to break compatibility of the public sections of classes and where internal classes not intended for public use are used internally, we try to either make them inaccessible (by implementing them in .cpp files) or namespacing them as such. |
Beta Was this translation helpful? Give feedback.
The answer is "it depends". The library is constructed in such a way that you can either use it as a full framework stemming from the creation of an Engine object or several bits on their own.
Generally though I'd say you probably want to create an Engine and use the functions to retrieve objects from there so they use the same Engine settings (temp folders etc).
If there are truly private classes in the engine they tend to be inaccessible or clearly marked as such. You generally want to just include
tracktion_engine.h
as that will provide everything from the library in the correct order.