Make plugin registration object and registration methods
Make plugin registration object and registration methods
Blueprint information
- Status:
- Complete
- Approver:
- Brian Aker
- Priority:
- Essential
- Drafter:
- Brian Aker
- Direction:
- Approved
- Assignee:
- Monty Taylor
- Definition:
- Approved
- Series goal:
- Accepted for trunk
- Implementation:
- Implemented
- Milestone target:
- cirrus
- Started by
- Jay Pipes
- Completed by
- Jay Pipes
Whiteboard
Global Singleton- Plugin_regsitry
To add plugin:
Plugin_
dlopens file
call dysym(initialize), passing in reference to Plugin_registry
initialize calls Plugin_
Plugin_
Plugin_
the returned plugin object may then be used to perform plugin registration
actions.
/* Plugin registration and plugin registration actions are separated so
that we can keep the management of the lifecyle of the plugin separate
from the lifecyle of the services the plugin provides
*/
To add a new plugin type:
Add a virtual method to Plugin that can be
Add a subclass of Plugin_registry
Typing:
Plugin_registry
Function_
If you want to do plugin_
Function_
This goes away... plugin_foreach should die, because each plugin type should be injecting into a type-specific registry. For instance, you don't need to foreach the plugins to find a UDF - you just ask the Function_registry for a function name "foo" ... the cost of list management happens at registration time. Obviously, the exact semantics of this will vary by plugin type.
Steps:
Replace plugin_map with Plugin_registry
Move plugin_array into Plugin_registry
Add Plugin class dlsym it
Using old structs - instantiate a Plugin and put it into Plugin_registry
Work Items
Dependency tree
* Blueprints in grey have been implemented.