User Tools

Site Tools


gsoc2016_keyboard_classes_overview

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
gsoc2016_keyboard_classes_overview [2016/05/16 14:26]
ferranpujolcamins [ControllerPresetVisitor]
gsoc2016_keyboard_classes_overview [2016/05/16 14:35]
ferranpujolcamins [ControllerPresetVisitor]
Line 12: Line 12:
  
 ==== ControllerPresetVisitor ==== ==== ControllerPresetVisitor ====
 +//​Controller::​setPreset(const Controller&​ preset)// needs to know the [[http://​stackoverflow.com/​questions/​7649649/​what-is-dynamic-type-of-object | dynamic type]] of preset, because a //​MidiController//​ should only handle instances of //​MidiControllerPreset//​. This class is inherited by //​Controller//​. This is part of the [[https://​en.wikipedia.org/​wiki/​Visitor_pattern | Visitor pattern]].
 //​Controller//​ inherits from it. This class defines a series of pure virtual methods called //visit//. //​Controller//​ subclasses must implement these //visit// methods according to their ability to handle each preset type. Like this: //​Controller//​ inherits from it. This class defines a series of pure virtual methods called //visit//. //​Controller//​ subclasses must implement these //visit// methods according to their ability to handle each preset type. Like this:
  
Line 22: Line 23:
 https://​github.com/​mixxxdj/​mixxx/​blob/​master/​src/​controllers/​controller.h#​L34 https://​github.com/​mixxxdj/​mixxx/​blob/​master/​src/​controllers/​controller.h#​L34
  
-More info: https://​en.wikipedia.org/​wiki/​Visitor_pattern+More info: [[https://​en.wikipedia.org/​wiki/​Visitor_pattern ​| Visitor pattern]]
 ==== ControllerEngine ==== ==== ControllerEngine ====
 It manages the loading and execution of a script. //​Controller//​ class holds a //​ControllerEngine//​ instance. It manages the loading and execution of a script. //​Controller//​ class holds a //​ControllerEngine//​ instance.
Line 38: Line 39:
 Manages creation/​enumeration/​deletion of hardware controllers. When a class wants to access a controller or query the available ones, it asks //​ControllerManager//​. There'​s only one instance of //​ControllerManager//​ that is created in //​MixxxMainWindow//​ (mixxx.cpp) and gets its //​slotSetUpDevices//​ method called, at Mixxx start. Manages creation/​enumeration/​deletion of hardware controllers. When a class wants to access a controller or query the available ones, it asks //​ControllerManager//​. There'​s only one instance of //​ControllerManager//​ that is created in //​MixxxMainWindow//​ (mixxx.cpp) and gets its //​slotSetUpDevices//​ method called, at Mixxx start.
  
 +==== ControllerVisitor ====
 +Similar to //​ControllerPresetVisitor//​. In this case //​ControllerMappingTableModel//​ wants to know the dynamic type of a //​Controller//​ instance.
gsoc2016_keyboard_classes_overview.txt ยท Last modified: 2016/05/16 16:22 by ferranpujolcamins