Skip to content

Class diagram #341

Description

@bluetech

All of the Hook* classes are somewhat confusing to me, and I always have to rediscover how they relate. So I created an ASCII diagram of it. I think it's worth shoving in a comment somewhere, or in some "architecture" document. I'll use this issue as a placeholder for that.

                                                 ┌──────────┐
                                                 │ HookSpec │
                                                 └──────────┘
                                                       ▲       plugin1    ┌────────┐
                                                       │  ┌──────────────►│HookImpl│
                                                       │  │               └────────┘
                                       foo_hook1 ┌─────┴──┴─┐
                                      ┌──────────┤HookCaller├───►...
                                      │          └────────┬─┘
                                      │                   │               ┌────────┐
                                      │                   └──────────────►│HookImpl│
                                      │                        plugin2    └────────┘
    ┌─────────────┐  pm.hook  ┌───────┴─┐
    │PluginManager├──────────►│HookRelay├───►...
    └─────────────┘           └───────┬─┘
                                      │                        plugin2    ┌────────┐
                                      │                  ┌───────────────►│HookImpl│
                                      │                  │                └────────┘
                                      │          ┌───────┴──┐
                                      └─────────►│HookCaller├───►...
                                       foo_hook2 └─────┬─┬──┘
                                                       │ │                ┌────────┐
                                                       │ └───────────────►│HookImpl│
                                                       ▼       plugin3    └────────┘
                                                 ┌──────────┐
                                                 │ HookSpec │
                                                 └──────────┘

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions