#include <IActiveContext.h>
An IActiveContext maintains a mapping between IIDs and pointers to implementations.
| virtual void IActiveContext::ChangeContextInterfaces | ( | const ContextTable & | table | ) | |
| pure virtual |
Add or replace one or more context interfaces. Existing interfaces that are not in the table are not affected. Notification is done after the entire table is changed for each affected PMIID.
| IDocument* IActiveContext::GetContextDocument | ( | | ) | const |
| inline |
Most users will only need these utility methods which provide access to the standard interfaces in an active context.
| virtual IPMUnknown* IActiveContext::GetContextInterface | ( | const PMIID & | id | ) | const |
| pure virtual |
Obtain a specific interface from the active context.
- Parameters
| id | is the PMIID of the desired interface |
- Returns
- the interface (NB: not AddRef'ed) or nil if not defined
| virtual void IActiveContext::GetContextInterfaces | ( | ContextTable & | table | ) | const |
| pure virtual |
Obtain all of the currently defined context interfaces.
| virtual bool16 IActiveContext::IsContextDelegate | ( | IActiveContext * | am_I_your_delegate | ) | const |
| pure virtual |
Test whether a delegate is the current delegate.
| virtual void IActiveContext::SetContextDelegate | ( | IActiveContext * | newDelegate | ) | |
| pure virtual |
SetContextDelegate(IActiveContext* delegate) in effect calls GetContextInterfaces to get the delegate's mapping and passes that table to SetContextInterfaces causing this context to synchronize its mapping with the delegate's and notifying observers of the change. In addition, any subsequent changes to this context get propagated to the delegate and any changes made directly to the delegate context are observed and realized in this context so that one may observe this context alone to be notified of changes to either context. SetContextDelegate also holds a reference to an externally specified delegate. Making a context its own delegate (e.g. ac->SetContextDelegate(ac)) means that the context should revert to the "default" mapping for its implementation. (For example, the session boss implementation installs the no-pub context consisting only of the app workspace and that workspace's associated selection.) Passing nil instructs the implementation to remove delegate and tear down any active interfaces because the context is shutting down.
| virtual void IActiveContext::SetContextInterfaces | ( | const ContextTable & | table | ) | |
| pure virtual |
Replace the existing context interfaces with a new set. In contrast to ChangeContextInterfaces, this method operates as if the table parameter were padded out with a nil pointer value for every IID not explicitly in the table. That is, no existing unspecified interface values in the context's mapping survive. SetContextInterfaces notifies once for each changed IID.