LLGL 0.05 Beta
Loading...
Searching...
No Matches
Interface.h File Reference
#include <LLGL/NonCopyable.h>
#include <LLGL/InterfaceID.h>

Classes

class  LLGL::Interface
 Base class for all interfaces in LLGL. More...

Namespaces

namespace  LLGL

Macros

#define LLGL_DECLARE_INTERFACE(ID)
 Declares the base functions for all LLGL interfaces.
#define LLGL_IMPLEMENT_INTERFACE(SELF, BASE)
 Implements the base functions for all LLGL interfaces.

Macro Definition Documentation

◆ LLGL_DECLARE_INTERFACE

#define LLGL_DECLARE_INTERFACE ( ID)
Value:
public: \
inline static int GetInterfaceID() \
{ \
return (ID); \
} \
bool IsInstanceOf(int id) const override

Declares the base functions for all LLGL interfaces.

◆ LLGL_IMPLEMENT_INTERFACE

#define LLGL_IMPLEMENT_INTERFACE ( SELF,
BASE )
Value:
bool SELF::IsInstanceOf(int id) const \
{ \
return (id == SELF::GetInterfaceID() || (id < SELF::GetInterfaceID() && BASE::IsInstanceOf(id))); \
}

Implements the base functions for all LLGL interfaces.