Files
Sourcetrail/src/lib/component/ComponentManager.h
T
2019-11-18 17:07:20 +01:00

46 lines
1.0 KiB
C++

#ifndef COMPONENT_MANAGER_H
#define COMPONENT_MANAGER_H
#include <memory>
#include <vector>
#include "Component.h"
#include "ComponentFactory.h"
#include "DialogView.h"
class CompositeView;
class DialogView;
class ScreenSearchSender;
class StorageAccess;
class TabbedView;
class View;
class ViewFactory;
class ViewLayout;
class ComponentManager
{
public:
ComponentManager(const ViewFactory* viewFactory, StorageAccess* storageAccess);
void clear();
void setupMain(ViewLayout* viewLayout, Id appId);
void setupTab(ViewLayout* viewLayout, Id tabId, ScreenSearchSender* screenSearchSender);
void teardownTab(ScreenSearchSender* screenSearchSender);
void clearComponents();
void refreshViews();
std::shared_ptr<DialogView> getDialogView(DialogView::UseCase useCase) const;
private:
ComponentFactory m_componentFactory;
std::vector<std::shared_ptr<View>> m_singleViews;
std::vector<std::shared_ptr<Component>> m_components;
std::map<DialogView::UseCase, std::shared_ptr<DialogView>> m_dialogViews;
};
#endif // COMPONENT_MANAGER_H