#include <Pt/Cosmo/IConnect.h>
Interface for optional component connections. More...
Inherits IUnknown.
Public Member Functions | |
| void | addComponent (Component &c) |
| Notifies that a connectable component was loaded. More... | |
| void | removeComponent (Component &c) |
| Notifies that a connectable component is being removed. More... | |
| bool | isConnectable (IComponentPlugin &p) const |
| Returns true if the plugin is connectable. More... | |
Protected Member Functions | |
| virtual bool | onIsConnectable (IComponentPlugin &p) const =0 |
| Determines whether a plugin is connectable. More... | |
| virtual void | onComponentAdded (Component &c)=0 |
| Called when a matching component is loaded. More... | |
| virtual void | onComponentRemoved (Component &c)=0 |
| Called when a matching component is being removed. More... | |
Implement this interface to react to other components becoming available or unavailable at runtime without requiring them as activation dependencies. Filter candidates in onIsConnectable() using hasFeatureId() or hasInterface() checks.
| void addComponent | ( | Component & | c | ) |
| c | The component that was added. |
| void removeComponent | ( | Component & | c | ) |
| c | The component that is being removed. |
| bool isConnectable | ( | IComponentPlugin & | p | ) | const |
| p | The plugin to check. |
|
protectedpure virtual |
Use hasFeatureId() or hasInterface() to filter candidates.
| p | The plugin to check. |
|
protectedpure virtual |
Use queryInterface() on the component to retrieve the optional interface.
| c | The component that was added. |
|
protectedpure virtual |
| c | The component that is being removed. |