object/i/iobject.h Source File
Go to the documentation of this file.
43 #define IObjectDerived public IObject
52 #define FncDefine(PFNC,ISPURE) virtual PFNC##ISPURE
53 #define K_IMPLEMENTATION
54 #define IObjectImplement(ClassName,IObjectOwner) \
55 HIObject ClassName##::IQuery(kInterfaceID pInterfaceID,int IsLocal) {\
56 if ((IObjectOwner!=NULL) && (!IsLocal)) {\
57 return IObjectOwner->IQuery(pInterfaceID);\
60 #define IObjectEnd return NULL; }
63 #define IQUERY(Object,Interface) ((H##Interface)((Object)->IQuery(Interface##ID,0)))
64 #define IQUERYLOCAL(Object,Interface) ( (H##Interface)((Object)->IQuery(Interface##ID,ILOCAL)))
66 #define IQ(Object,Interface) IQUERY(Object,Interface)
67 #define IQT(Object,Interface) ((Object) ? IQUERY(Object,Interface):NULL)
68 #define IQL(Object,Interface) IQUERYLOCAL(Object,Interface)
75 #define IObject_Declare(IsPure)\
77 virtual HIObject IQuery(kInterfaceID pInterfaceID, int IsLocal=0)IsPure;\
78 virtual void Destroy(int IsLocal=0)IsPure;\
80 #define IQuery_Declare(IsPure)\
82 virtual HIObject IQuery (kInterfaceID pInterfaceID, int IsLocal=0)IsPure;\
91 #define K_INTERFACE_SPECIAL __declspec(novtable)
92 #define NO_DLL __declspec() // Use for the Module parameter if the interface is not exported
94 #define K_INTERFACE_SPECIAL
95 #define NO_DLL // Use for the Module parameter if the interface is not exported
98 #define K_INTERFACE( Name,Id ) \
100 const int Name##ID = Id; \
101 class K_INTERFACE_SPECIAL Name : IObjectDerived { \
102 Name##_Declare(abstract); \
105 #endif // Must be the last line of the include file
#define IObject_Declare(IsPure)
unsigned long kInterfaceID
other types
HIObject(* kObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)