#1 App class in Pynsource

fallback image probably showing plantuml error image



Diagram Information

Created by: abulka   published
Language: Python
Repository: abulka/pynsource  github
Commit: master
Tags: featured-py-pynsource


The App class owns an instance of Controller.  The App class also has a Boot() method, as well as a Shutdown() method.

The Controller is defined thus:

class Controller:
    def __init__(selfapp):
        self.app = app
        self.cmd_mgr = CommandManager(100)
        self.invoker = CmdInvoker(self.app.context, self.cmd_mgr)


The CmdInvoker class needs special documentation, because it uses a little bit of Python "magic" to work.

When you call any method on an instance of this invoker class, the method is interpreted as the name of a command class to be instantiated. Parameters in the method call are used as parameters to the constructor. After the command class is instantiated, a context object is attached, and the command passed to a command manager to be run. No extra parameters are injected into the constructor or to the execute() call.

Modules being visualised

List of repository modules/files being visualised in the above diagram: