Public Includes

Unlike Scaleform 3.x, most public headers in Scaleform 4 reside in the /Src tree, and not the /Include folder. This makes it easier to locate the corresponding header for a .cpp file, since they are side by side. It is also consistent with our namespace hierarchy and keeps related code together, organized by library.

In order to make it easier to include public headers, 'convenience' headers are generated which include groups of public headers. For example, GFx.h includes the major Scaleform public headers; GFx_Kernel.h includes Kernel public headers, etc. These convenience headers are automatically generated and reside in the Include folder.

Users may utilize these convenience headers, which are an easy way to include common public headers. Alternatively, specific individual header files may be included directly, to minimize the number of includes.

Example using manual header inclusion:

    #include "Kernel/SF_File.h"
    #include "GFx/GFx_Player.h"
    #include "GFx/GFx_Loader.h"
    #include "GFx/GFx_Log.h"

Example using convenience headers:

    #include "GFx_Kernel.h"
    #include "GFx.h"

Every public header has a comment at the top, which indicates that it should be public, as well as specifying which convenience group it belongs to.

The public header tag is as shown:

    "PublicHeader      :   GroupName"

where GroupName corresponds to the groups, such as GFx, Kernel, Render, AMP, ... or none. If the GroupName is GFx, the public header gets included by GFx.h, if the GroupName is Kernel, it is included by the convenience header GFx_Kernel.h, etc. If the GroupName is 'none', it indicates that it is a less common public header which isn't included by any convenience header - in which case it can be included manually if needed.