Commit cfb3b7e8 authored by Alexandre Julliard's avatar Alexandre Julliard

Output BEGIN/END_INTERFACE for C++ base classes too.

parent 59302aed
......@@ -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, "#else\n");
/* C interface */
fprintf(header, "typedef struct %sVtbl %sVtbl;\n", iface->name, iface->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment