SourceForge has been redesigned. Learn more.

#53 Delphi Interfaces aren't translated correctly


Given the following constructs:

{* Implement this interface so that an object can read/write
its own settings.
Register the @ref TMgSettingsSelfStoringObjectHandler to
handle objects
that implement this interface.
IMgSettingsSelfStoringObject = interface
{ Read settings using the given cursor.
procedure ReadSettings( aCursor: TMgSettingsCursor );
{ Write settings using the given cursor.
procedure WriteSettings( aCursor: TMgSettingsCursor );
{ Called before reading settings; use for clearing lists
or other sub-objects.
procedure InitializeSettings;
{ Unique name under which the settings are stored.
function HandlerIdForSettings: string;
end {IMgSettingsSelfStoringObject};

{* Use this base class to make an object work with the
@ref TMgSettingsSelfStoringObjectHandler. Implements some
of the
@ref IMgSettingsObjectHandler methods. @ref ReadSettings
@ref WriteSettings must be implemented by the object

Note: This object descends from TPersistent so that it
can be automatically
created by Delphi when CreateObject is used to read it
from file. Therefore,
it needs to copy the implementation of the basic
interface methods from
TMgSettingsSelfStoringObject = class( TPersistent, IUnknown,
IMgSettingsSelfStoringObject )
function QueryInterface(const IID: TGUID; out Obj):
HResult; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
procedure ReadSettings( aCursor: TMgSettingsCursor );
virtual; abstract;
procedure WriteSettings( aCursor: TMgSettingsCursor );
virtual; abstract;
procedure InitializeSettings; virtual;
function HandlerIdForSettings: string; virtual;
end {TMgSettingsSelfStoringObject};

It should process the interfaces as something reasonable ... I'
m just not sure what the source format for Doxygen is. If it's
C++, there are no interfaces, so you'd have to generate an
abstract class with the interface definition and allow Doxygen
to view uses of interfaces as multiple inheritance. If the
source format can include Java, then the interface can be
translated directly. Regardless, the GUID under the class
name, though optional, must be processed and discarded.


Log in to post a comment.