IDTester Class Template Reference


Static Public Methods

bool test (const Guid &id)

Detailed Description

template<class I>
class IDTester< I >

This class is used by the PlugInBase class to perform the id comparison in it's queryInterface implementation. The purpose of this class is to allow some interfaces to override the usual comparison mechanism. This is most often required because the interface in question inherits from an interface other than IBase. Note that the default expansion of IDTester assumes that the comparison sequence if to first compare against the interface given in the template parameter, then against IID_IBase. For an interface that, derives from another interface (e.g. ISequence derives from IIter) a full specialization of IDTester should be defined to change the comparison sequence to first compare against the derived interface's id, then invoke IDTester::test() of the base interface.


Member Function Documentation

template<class I>
static bool IDTester< I >::test const Guid &    id [inline, static]
 

This function tests the incoming Guid given in "id" against all of the interface id's that this interface can respond to. For a simple interface that derives from IBase, the possible id's that result in a "true" result are the ID of the derived interface, and IID_IBase.

Parameters:
id The interface id being tested.


The documentation for this class was generated from the following files:

Return to top of page