![]() |
pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
|
Plank fundamentals. More...
Modules | |
Core Plank concepts. | |
An outline of the core concepts used in Plank. |
Plank fundamentals.
All Plank data types are prefixed with the word 'Plank' (uppercase 'P'). A range of built-in types are typdef'd in Plank using the following abbreviations:
Unsigned version (where applicable) are prefixed with 'U'. So for example, a PlankUI type is just an unsigned int. This naming scheme is also employed in functions.
All functions are prefxed with 'pl_'. This is followed by further specification with each word generally starting with an uppercase character (i.e., camel case) and a data type code if applicable. For example the equivalent of the 'fabsf' function in Plank is pl_AbsF().
.. [more examples]
Although the API for Plank is entirely C-based it uses a system similar to an object-oriented language in order to perform certain actions. This is usually through the creation of an "object" that is referred to by an opaque pointer (which internally is a C structure). Examples of this are the random number generator , FFT processing , and file IO .
The convention here is to have pl_XXX_Create() and pl_XXX_Destroy() functions to allocate and deallocate the object respectively. In addition there are pl_XXX_Init() and pl_XXX_DeInit() functions for initialising and deinitialising the objects. Create and destroy functions can be avoided with many of the "classes" by using static allocation of the structures. The rule of thumb is that the create functions do not intialise, this must be done in a separate step or using the pl_XXX_CreateAndInit() funciton. Conversely the destroy function DOES call the pl_XXX_DeInit() function.
Here 'XXX' will be the name of the Plank class in question. Then other functions that operate on the object will be in the form pl_XXX_YYY() where 'YYY' is effectively the "member function" name.