VCOM:IVWUnknown

From Vectorworks Developer
Revision as of 15:09, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

What is this?

This interface gives the fundamental capability of an interface to participate in VectorWorks' VCOM:VCOM (VectorWorks Component Object Model).

An interface is a VCOM interface if it inherits directly or indirectly this base interface class.

// ---------------------------------------------------------------------------------------------------
// Base interface for all interfaces in VCOM
class IVWUnknown
{
public:
	virtual					~IVWUnknown( void )	{}
	virtual long VCOM_CALLTYPE		AddRef() = 0;
	virtual long VCOM_CALLTYPE		Release() = 0;
	
};

Note The empty destructor is necessary to satisfy the XCode Mac compiler. Otherwise it producess tons of warnings.

Every VCOM interface is recognized by the VectorWorks by it's VCOM:VWIID. This means that each interface should have one VCOM:VWIID defined.

Note Some interface doesn't have VCOM:VWIID defined. This is in purpose because they are not ment to be queried (SDK:GS_VWQueryInterface or VCOM:VCOMPtr) They are obtained through another VCOM interface that has 'get' or 'query' function.

Sample

// --------------------------------------------------------------------------------------------------
// {B5706042-BF87-4cff-9BD9-3A08B01C183C}
static const VWIID IID_VCOMSample = { 0xb5706042, 0xbf87, 0x4cff, { 0x9b, 0xd9, 0x3a, 0x8, 0xb0, 0x1c, 0x18, 0x3c } };
 
class IVCOMSample : public IVWUnknown
{
public:
    virtual VCOMError VCOM_CALLTYPE Function() = 0;
};

See Also

VCOM:IVWSingletonUnknown