![]() | GetParent |
Gets the parent repeated capability instance.
template <typename T> T* GetParent() const;
Returns a pointer to the parent repeated capability instance.
If the calling code is not on a repeated capability or the calling code is on the main driver class, this function returns a pointer to the main driver class. Thus, GetParent if safe to call from any driver function.
The following example demonstrates use of the GetParent function.
// CoAcme4321Channel.cpp HRESULT Acme4321Channel::Configure(double dOffset) { HRESULT hr = S_OK; CString strParentName = GetParent()->GetInstanceName(); return hr; }