logic: code controller communication

- Replaced CodeAccess with LocationAccess.
- Implemented basic functionality for CodeController.
- Added messaging to the project.
- Added QtThreadedFunctor to enable our Messaging thread to invoke calls on the QtThread.
- Added GraphController.

fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
malte_langkabel
2014-07-02 16:42:33 +02:00
parent a8e32af5dd
commit 400e2629d2
37 changed files with 441 additions and 78 deletions
+20 -4
View File
@@ -3,8 +3,8 @@
#include <memory>
#include "component/controller/Controller.h"
#include "component/view/View.h"
class View;
class Controller;
class Component
{
@@ -12,8 +12,11 @@ public:
Component(std::shared_ptr<View> view, std::shared_ptr<Controller> controller);
~Component();
Controller* getController() const;
View* getView() const;
template <typename ControllerType>
ControllerType* getController() const;
template <typename ViewType>
ViewType* getView() const;
private:
const std::shared_ptr<Controller> m_controller;
@@ -21,4 +24,17 @@ private:
};
template <typename ControllerType>
ControllerType* Component::getController() const
{
return dynamic_cast<ControllerType*>(m_controller.get());
}
template <typename ViewType>
ViewType* Component::getView() const
{
return dynamic_cast<ViewType*>(m_view.get());
}
#endif // COMPONENT_H