![]() | GetRoot |
Gets a pointer to the main driver class.
template <typename T> T* GetRoot() const;
Returns a pointer to the main driver class.
This function always returns a pointer to the main driver class, even if it is called from the main driver. Thus, GetRoot if safe to call from any driver function.
The following example demonstrates use of the GetRoot function.
// CoAcme4321Channel.cpp HRESULT Acme4321Channel::Configure(double dOffset) { HRESULT hr = S_OK; Acme4321* pRoot = GetRoot(); return hr; }