Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <memory>
Classes | |
class | xbmcutil::GlobalsSingleton< T > |
class | xbmcutil::InitFlag |
Namespaces | |
namespace | xbmcutil |
Macros | |
#define | XBMC_GLOBAL_REF(classname, g_variable) |
#define | XBMC_GLOBAL_USE(classname) |
#define XBMC_GLOBAL_REF | ( | classname, | |
g_variable ) |
For pattern (2) above, you can use the following macro. This pattern is safe to use in all cases but may be very slightly less efficient.
Also, you must also use a #define to replace the actual global variable since there's no way to use a macro to add a #define. An example would be:
XBMC_GLOBAL_REF(CWinSystemWin32DX, g_Windowing); #define g_Windowing XBMC_GLOBAL_USE(CWinSystemWin32DX)
#define XBMC_GLOBAL_USE | ( | classname | ) |
This declares the actual use of the variable. It needs to be used in another #define of the form:
#define g_variable XBMC_GLOBAL_USE(classname)