Output BEGIN/END_INTERFACE for C++ base classes too.
This commit is contained in:
parent
59302aed35
commit
cfb3b7e81f
|
@ -36,6 +36,8 @@ struct __attribute__((com_interface)) IUnknown
|
|||
struct IUnknown
|
||||
#endif
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) = 0;
|
||||
|
@ -46,6 +48,7 @@ struct IUnknown
|
|||
virtual ULONG STDMETHODCALLTYPE Release(
|
||||
) = 0;
|
||||
|
||||
END_INTERFACE
|
||||
};
|
||||
#else
|
||||
typedef struct IUnknownVtbl IUnknownVtbl;
|
||||
|
|
|
@ -745,7 +745,14 @@ void write_com_interface(type_t *iface)
|
|||
/* C++ interface */
|
||||
fprintf(header, "#if defined(__cplusplus) && !defined(CINTERFACE)\n");
|
||||
if (iface->ref)
|
||||
{
|
||||
fprintf(header, "struct %s : public %s\n", iface->name, iface->ref->name);
|
||||
fprintf(header, "{\n");
|
||||
indentation++;
|
||||
write_cpp_method_def(iface);
|
||||
indentation--;
|
||||
fprintf(header, "};\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(header, "#ifdef ICOM_USE_COM_INTERFACE_ATTRIBUTE\n");
|
||||
|
@ -753,12 +760,15 @@ void write_com_interface(type_t *iface)
|
|||
fprintf(header, "#else\n");
|
||||
fprintf(header, "struct %s\n", iface->name);
|
||||
fprintf(header, "#endif\n");
|
||||
fprintf(header, "{\n");
|
||||
fprintf(header, " BEGIN_INTERFACE\n");
|
||||
fprintf(header, "\n");
|
||||
indentation++;
|
||||
write_cpp_method_def(iface);
|
||||
indentation--;
|
||||
fprintf(header, " END_INTERFACE\n");
|
||||
fprintf(header, "};\n");
|
||||
}
|
||||
fprintf(header, "{\n");
|
||||
indentation++;
|
||||
write_cpp_method_def(iface);
|
||||
indentation--;
|
||||
fprintf(header, "};\n");
|
||||
fprintf(header, "#else\n");
|
||||
/* C interface */
|
||||
fprintf(header, "typedef struct %sVtbl %sVtbl;\n", iface->name, iface->name);
|
||||
|
|
Loading…
Reference in New Issue