project: added project skeleton

Skeleton includes emtpy implementations of application class structure.
Source groups were added to CMakeLists to define filters in Visual Studio.
This commit is contained in:
Eberhard Graether
2014-03-31 17:59:52 +02:00
parent b5f91e62fa
commit d4e3433e5d
72 changed files with 957 additions and 57 deletions
+11
View File
@@ -0,0 +1,11 @@
#include "component/Component.h"
Component::Component(const std::shared_ptr<Controller>& controller, const std::shared_ptr<View>& view)
: m_controller(controller)
, m_view(view)
{
}
Component::~Component()
{
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef COMPONENT_H
#define COMPONENT_H
#include <memory>
#include "component/controller/Controller.h"
#include "component/view/View.h"
class Component
{
public:
Component(const std::shared_ptr<Controller>& controller, const std::shared_ptr<View>& view);
~Component();
private:
std::shared_ptr<Controller> m_controller;
std::shared_ptr<View> m_view;
};
#endif // COMPONENT_H
+23
View File
@@ -0,0 +1,23 @@
#include "component/ComponentFactory.h"
std::shared_ptr<ComponentFactory> ComponentFactory::create(
const std::shared_ptr<ViewManager>& viewManager,
const std::shared_ptr<GuiElementFactory>& guiElementFactory,
const std::shared_ptr<CodeAccess>& codeAccess,
const std::shared_ptr<GraphAccess>& graphAccess)
{
std::shared_ptr<ComponentFactory> ptr(new ComponentFactory());
ptr->m_viewManger = viewManager;
ptr->m_guiElementFactory = guiElementFactory;
ptr->m_codeAccess = codeAccess;
ptr->m_graphAccess = graphAccess;
return ptr;
}
ComponentFactory::ComponentFactory()
{
}
ComponentFactory::~ComponentFactory()
{
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef COMPONENT_FACTORY_H
#define COMPONENT_FACTORY_H
#include <memory>
#include "component/Component.h"
#include "component/view/ViewManager.h"
#include "data/access/CodeAccess.h"
#include "data/access/GraphAccess.h"
#include "gui/GuiElementFactory.h"
class ComponentFactory
{
public:
static std::shared_ptr<ComponentFactory> create(
const std::shared_ptr<ViewManager>& viewManager,
const std::shared_ptr<GuiElementFactory>& guiElementFactory,
const std::shared_ptr<CodeAccess>& codeAccess,
const std::shared_ptr<GraphAccess>& graphAccess);
~ComponentFactory();
private:
ComponentFactory();
ComponentFactory(const ComponentFactory&);
std::shared_ptr<ViewManager> m_viewManger;
std::shared_ptr<GuiElementFactory> m_guiElementFactory;
std::shared_ptr<CodeAccess> m_codeAccess;
std::shared_ptr<GraphAccess> m_graphAccess;
};
#endif // COMPONENT_FACTORY_H
+20
View File
@@ -0,0 +1,20 @@
#include "component/ComponentManager.h"
std::shared_ptr<ComponentManager> ComponentManager::create(
const std::shared_ptr<ViewManager>& viewManager,
const std::shared_ptr<GuiElementFactory>& guiElementFactory,
const std::shared_ptr<CodeAccess>& codeAccess,
const std::shared_ptr<GraphAccess>& graphAccess)
{
std::shared_ptr<ComponentManager> ptr(new ComponentManager());
ptr->m_componentFactory = ComponentFactory::create(viewManager, guiElementFactory, codeAccess, graphAccess);
return ptr;
}
ComponentManager::ComponentManager()
{
}
ComponentManager::~ComponentManager()
{
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef COMPONENT_MANAGER_H
#define COMPONENT_MANAGER_H
#include <memory>
#include <vector>
#include "data/access/CodeAccess.h"
#include "data/access/GraphAccess.h"
#include "component/Component.h"
#include "component/ComponentFactory.h"
#include "component/view/ViewManager.h"
#include "gui/GuiElementFactory.h"
class ComponentManager
{
public:
static std::shared_ptr<ComponentManager> create(
const std::shared_ptr<ViewManager>& viewManager,
const std::shared_ptr<GuiElementFactory>& guiElementFactory,
const std::shared_ptr<CodeAccess>& codeAccess,
const std::shared_ptr<GraphAccess>& graphAccess);
~ComponentManager();
private:
ComponentManager();
ComponentManager(const ComponentManager&);
std::shared_ptr<ComponentFactory> m_componentFactory;
std::vector<std::shared_ptr<Component>> m_components;
};
#endif // COMPONENT_MANAGER_H
@@ -0,0 +1 @@
#include "component/controller/CodeController.h"
@@ -0,0 +1,11 @@
#ifndef CODE_CONTROLLER_H
#define CODE_CONTROLLER_H
#include "component/controller/Controller.h"
class CodeController: public Controller
{
};
#endif // CODE_CONTROLLER_H
@@ -0,0 +1,5 @@
#include "component/controller/Controller.h"
Controller::~Controller()
{
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef CONTROLLER_H
#define CONTROLLER_H
class Controller
{
public:
virtual ~Controller();
};
#endif // CONTROLLER_H
+2
View File
@@ -0,0 +1,2 @@
#include "component/view/CodeView.h"
+11
View File
@@ -0,0 +1,11 @@
#ifndef CODE_VIEW_H
#define CODE_VIEW_H
#include "component/view/View.h"
class CodeView: public View
{
};
#endif // CODE_VIEW_H
+5
View File
@@ -0,0 +1,5 @@
#include "component/view/View.h"
View::~View()
{
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef VIEW_H
#define VIEW_H
class View
{
public:
virtual ~View();
};
#endif // VIEW_H
+9
View File
@@ -0,0 +1,9 @@
#include "component/view/ViewManager.h"
ViewManager::ViewManager()
{
}
ViewManager::~ViewManager()
{
}
+20
View File
@@ -0,0 +1,20 @@
#ifndef VIEW_MANAGER_H
#define VIEW_MANAGER_H
#include <memory>
#include <vector>
#include "component/view/View.h"
class ViewManager
{
public:
ViewManager();
~ViewManager();
private:
std::vector<std::shared_ptr<View>> m_views;
};
#endif // VIEW_MANAGER_H