| 6 | |
| 7 | template<typename TImpl, typename TInterface> |
| 8 | class ComClass : public TInterface { |
| 9 | protected: |
| 10 | TImpl *m_pParent; |
| 11 | |
| 12 | public: |
| 13 | ComClass(TImpl *pParent) : m_pParent(pParent) {} |
| 14 | |
| 15 | // IUnknown delegation |
| 16 | STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) { |
| 17 | return m_pParent->QueryInterface(riid, ppvObject); |
| 18 | } |
| 19 | |
| 20 | STDMETHODIMP_(ULONG) AddRef(void) { |
| 21 | return m_pParent->AddRef(); |
| 22 | } |
| 23 | |
| 24 | STDMETHODIMP_(ULONG) Release(void) { |
| 25 | return m_pParent->Release(); |
| 26 | } |
| 27 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected