![]() |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Proxy to core entity manager. More...
#include "ientitymanager.h"
Classes | |
struct | DelegationResult |
The result of delegating this entity to another plugin. More... | |
Public Member Functions | |
virtual | ~IEntityManager () |
virtual DelegationResult | DelegateEntity (LC::Entity entity, QObject *desired=nullptr)=0 |
Delegates the given entity and returns the delegation result. More... | |
virtual bool | HandleEntity (LC::Entity entity, QObject *desired=nullptr)=0 |
Handles the given entity. More... | |
virtual bool | CouldHandle (const LC::Entity &entity)=0 |
Queries whether the given entity can be handled at all. More... | |
virtual QList< QObject * > | GetPossibleHandlers (const LC::Entity &entity)=0 |
Queries what plugins can handle the given entity. More... | |
Proxy to core entity manager.
Core entity manager is that very thing that routes entities between different plugins and chooses which plugins will handle what entity.
This class can be used instead of the more or less deprecated IInfo::gotEntity() signal.
Definition at line 31 of file ientitymanager.h.
|
inlinevirtual |
Definition at line 54 of file ientitymanager.h.
|
pure virtual |
Queries whether the given entity can be handled at all.
[in] | entity | The entity to test. |
|
pure virtual |
Delegates the given entity and returns the delegation result.
Queries all plugins if they can handle the given entity, and chooses one of them. If the desired object is set, this method first tries to handle the entity with it. Returns a structure describing the delegation result.
This function shall only be called from the UI thread.
[in] | entity | The entity to handle. |
[in] | desired | The object to try first. |
|
pure virtual |
Queries what plugins can handle the given entity.
[in] | entity | The entity to test. |
Referenced by LC::Util::GetDataFilters().
|
pure virtual |
Handles the given entity.
Queries all plugins if they can handle the given entity, and chooses one of them (or all of them, according to entity flags and plugins' behavior). If the desired object is set, this method first tries to handle the entity with it.
It is safe to call this method from non-UI threads.
[in] | entity | The entity to handle. |
[in] | desired | The object to try first. |