RE: [GD-General] Multiple Inheritance and RTTI
Brought to you by:
vexxed72
From: Donavon K. <kei...@ea...> - 2003-02-08 06:25:47
|
Instantiating a class by some means other than CoCreateInstance[Ex] is not re-implementing COM. Many, many standard COM objects are not co-creatable (if I remember the jargon correctly). Like... D3D, for instance. COM only has a few mandatory rules, like implementing IUnknown and adhering to certain QueryInterface semantics. It's not much of an imposition and it leaves you open to interoperating with the rest of the COM world. Implement a typelib and adhere to some basic type rules and your objects will be callable from Visual Basic and .NET. Implement IDispatch and you open your objects up to the scripting world. Just don't do what one company I know did, and that's redefine IUnknown. They called it "IUnknown", it had QI, AddRef, and Release, but IIDs were strings, not GUIDs. So their "custom" COM system looked just like COM, but it was totally incompatible. There was no possibility of interop and where they could have taken advantage of ATL's rich set of classes, they instead had to redefine their own macros and template classes. It was an utterly pointless exercise in NIH. Donavon > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Gareth Lewin > Sent: Thursday, February 06, 2003 4:31 AM > To: gam...@li... > Subject: RE: [GD-General] Multiple Inheritance and RTTI > > COM basics are extremly simple to implement. > > You really need a standard way to implement a "Give me this interface" > function. (QueryIterface) > A standard way of iding interfaces (GUIDs or FourCCs or whatever) > And a base interface that concreate class implements. (IUnknown) > > A lot of COM also uses Factories, Ref counting and sometimes smart > pointers. > They are not needed, but tend to fit well ( For example ref counting works > nice with QueryInterface because you might have a few interfaces to the > same > object ). > > Again, Inside COM is a must read if you plan on having a COM like system. > > > -----Original Message----- > > From: gekido [mailto:mi...@ub...] > > Sent: 05 February 2003 21:30 > > To: gam...@li... > > Subject: Re: [GD-General] Multiple Inheritance and RTTI > > > > > > with this said, anyone know of any opensource projects > > implementing a base > > COM-style cross-platform & cross-compiler library out there? > > > > surely there must be someone that's done the hard part for us ;} > > > > just curious > > > > mike w > > www.uber-geek.ca > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 |