I like the example - but it does show some gaps in the current architecture:
234 + // TODO: Remove strange dynamic cast. Perhaps this is an indication that SessionManager provides an interface such as
235 + // "FocusController" (and configuration, the_focus_controller())
I agree - focus_next() belongs in an interface (otherwise code that uses it cannot be unit tested).
~~~~
236 + // TODO: We use this strange two phase initialization in order to
237 + // avoid a circular dependency between the_input_filters() and the_session_store(). This seems to indicate that perhaps
238 + // the InputManager should not be the InputFocusSelector
That's the_*event*_filters() right?
Doesn't the potential circular dependency in configuration indicate that we have an ownership cycle and a potential resource leak?
Initializing a static variable with a member variable?
That means if there ever were a second instance of this class (unlikely I know) then the function would return a reference to the ApplicationSwitcher created by the first instance. (And elsewhere the new instance is used.)
I like the example - but it does show some gaps in the current architecture:
234 + // TODO: Remove strange dynamic cast. Perhaps this is an indication that SessionManager provides an interface such as controller( ))
235 + // "FocusController" (and configuration, the_focus_
I agree - focus_next() belongs in an interface (otherwise code that uses it cannot be unit tested).
~~~~
236 + // TODO: We use this strange two phase initialization in order to store() . This seems to indicate that perhaps
237 + // avoid a circular dependency between the_input_filters() and the_session_
238 + // the InputManager should not be the InputFocusSelector
That's the_*event* _filters( ) right?
Doesn't the potential circular dependency in configuration indicate that we have an ownership cycle and a potential resource leak?
I think deeper thought is required.
~~~~
217 + std::initialize r_list< std::shared_ ptr<mi: :EventFilter> const> the_event_filters() override r_list< std::shared_ ptr<mi: :EventFilter> const> filter_list = { app_switcher }; ptr<me: :ApplicationSwi tcher> app_switcher;
218 + {
219 + static std::initialize
220 + return filter_list;
221 + }
222 +
223 + std::shared_
Initializing a static variable with a member variable?
That means if there ever were a second instance of this class (unlikely I know) then the function would return a reference to the ApplicationSwitcher created by the first instance. (And elsewhere the new instance is used.)