Objective Views : Chapter 6 Key Architectural Concepts : IQueryGuid and IRefCount
IQueryGuid and IRefCount
The Stingray Foundation Library (SFL) provides a mechanism for interface-based programming that provides the same types of services as COM, without interfering with COM. The IQueryGuid interface defines the QueryGuid() function, which is similar to QueryInterface(). The QueryGuid() function takes a GUID and returns a pointer to a given data type. It provides a flexible substitute for the dynamic_cast operator. The IRefCount interface defines AddRef() and Release() functions that have identical signatures to those defined by IUnknown. SFL also provides a guid_cast operator that is syntactically equivalent to dynamic_cast, but is implemented using the IQueryGuid interface. Refer to the Stingray Foundation Library User’s Guide for more information about IQueryGuid, IRefCount, and guid_cast.