OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PreviewAssembler.h
Go to the documentation of this file.
1#pragma once
7
8#include <memory>
9#include <string>
10#include <list>
11#include <vector>
12
14{
15public:
16 PreviewAssembler(ot::components::ModelComponent* modelComponent, std::string tableFolder) : _modelComponent(modelComponent), _tableFolder(tableFolder) {};
17 std::shared_ptr<EntityParameterizedDataPreviewTable> AssembleTable(ot::UIDList& existingRanges);
18
19protected:
21 std::vector<std::shared_ptr<EntityTableSelectedRanges>> _selectedRangeEntities;
22 std::vector<std::shared_ptr<EntityParameterizedDataTable>> _tableSources;
23
24 virtual void InitiatePreviewTable(std::shared_ptr<EntityResultTableData<std::string>> sourceTable) = 0;
25 virtual void AddFieldsToTable(std::shared_ptr<EntityResultTableData<std::string>> previewTable) = 0;
26
27private:
28 ot::components::ModelComponent* _modelComponent = nullptr;
29 std::string _tableFolder;
30 void CountPreviewFieldsFromSelectedRanges();
31
32 void LoadSelectedRangesAndTableSources(ot::UIDList& tableNames);
33 void LoadTableSources(std::list<std::string>& tableNames);
34
35};
Definition PreviewAssembler.h:14
std::shared_ptr< EntityParameterizedDataPreviewTable > AssembleTable(ot::UIDList &existingRanges)
Definition PreviewAssembler.cpp:8
std::vector< std::shared_ptr< EntityParameterizedDataTable > > _tableSources
Definition PreviewAssembler.h:22
virtual void InitiatePreviewTable(std::shared_ptr< EntityResultTableData< std::string > > sourceTable)=0
int _numberOfFields
Definition PreviewAssembler.h:20
virtual void AddFieldsToTable(std::shared_ptr< EntityResultTableData< std::string > > previewTable)=0
PreviewAssembler(ot::components::ModelComponent *modelComponent, std::string tableFolder)
Definition PreviewAssembler.h:16
std::vector< std::shared_ptr< EntityTableSelectedRanges > > _selectedRangeEntities
Definition PreviewAssembler.h:21
Definition ModelComponent.h:42
std::list< UID > UIDList
Unique identifier list.
Definition CoreTypes.h:31