Files
Sourcetrail/src/lib/component/ComponentFactory.h
T
Eberhard Graether a527a3c34d logic: rewrote messages handling token activation for correct restoring on undo
* saving search query to undo stack with MessageSearch
* saving node and edge with name to undo stack with MessageActivateNode and MessageActivateEdge
* added FeatureController that handels distribution of MessageActivateTokens
* clearing views when refreshing or changing project
* clearing undo stack when changing project
* added StorageCache derived from StorageAccessProxy
2015-06-19 00:20:50 +02:00

38 lines
1.0 KiB
C++

#ifndef COMPONENT_FACTORY_H
#define COMPONENT_FACTORY_H
#include <memory>
#include "data/access/StorageAccess.h"
class Component;
class ViewFactory;
class ViewLayout;
class ComponentFactory
{
public:
static std::shared_ptr<ComponentFactory> create(ViewFactory* viewFactory, StorageAccess* storageAccess);
~ComponentFactory();
ViewFactory* getViewFactory() const;
std::shared_ptr<Component> createCodeComponent(ViewLayout* viewLayout);
std::shared_ptr<Component> createFeatureComponent();
std::shared_ptr<Component> createGraphComponent(ViewLayout* viewLayout);
std::shared_ptr<Component> createRefreshComponent(ViewLayout* viewLayout);
std::shared_ptr<Component> createSearchComponent(ViewLayout* viewLayout);
std::shared_ptr<Component> createStatusBarComponent(ViewLayout* viewLayout);
std::shared_ptr<Component> createUndoRedoComponent(ViewLayout* viewLayout);
private:
ComponentFactory();
ComponentFactory(const ComponentFactory&);
ViewFactory* m_viewFactory;
StorageAccess* m_storageAccess;
};
#endif // COMPONENT_FACTORY_H