18class __declspec(dllexport) ResultCollectionExtender :
public ResultCollectionMetadataAccess
21 ResultCollectionExtender(
const std::string& _collectionName,
ot::components::ModelComponent& _modelComponent, ClassFactory* _classFactory,
const std::string& _ownerServiceName);
22 ResultCollectionExtender(
const ResultCollectionExtender& _other) =
delete;
23 ResultCollectionExtender& operator=(
const ResultCollectionExtender& _other) =
delete;
24 ~ResultCollectionExtender() =
default;
26 void setSaveModel(
bool _saveModel) { m_saveModel = _saveModel; }
28 ot::UID buildSeriesMetadata(std::list<DatasetDescription>& _datasetDescriptions,
const std::string& _seriesName, std::list<std::shared_ptr<MetadataEntry>>& _seriesMetadata);
29 ot::UID buildSeriesMetadata(std::list<DatasetDescription>& _datasetDescriptions,
const std::string& _seriesName, std::list<std::shared_ptr<MetadataEntry>>&& _seriesMetadata);
31 bool campaignMetadataWithSameNameExists(std::shared_ptr<MetadataEntry> _metadata);
32 bool campaignMetadataWithSameValueExists(std::shared_ptr<MetadataEntry> _metadata);
35 void processDataPoints(DatasetDescription* dataDescription, uint64_t seriesMetadataIndex);
41 void addCampaignMetadata(std::shared_ptr<MetadataEntry> _metadata);
43 void storeCampaignChanges();
44 bool removeSeries(
ot::UID _uid);
46 ResultImportLogger& getLogger() {
return m_logger; }
49 inline bool invariant() {
return true; }
51 ResultCollectionExtender() {};
52 bool m_requiresUpdateMetadataCampaign =
false;
53 std::list<const MetadataSeries*> m_seriesMetadataForStorage;
55 std::map<std::string,uint32_t> m_parameterBuckets;
56 const std::string m_ownerServiceName;
58 ResultImportLogger m_logger;
60 ot::UIDList addCampaignContextDataToParameters(DatasetDescription& _dataDescription);
61 void addCampaignContextDataToQuantities(DatasetDescription& _dataDescription,
ot::UIDList& _dependingParameter);
62 ot::UID createNewSeries(std::list< DatasetDescription>& _dataDescription,
const std::string& _seriesName, std::list<std::shared_ptr<MetadataEntry>>& _seriesMetadata);
63 void addMetadataToSeries(std::list< DatasetDescription>& _dataDescription, MetadataSeries& _newSeries);
65 std::map<std::string, std::list<MetadataQuantity*>> m_quantitiesUpForStorageByName;
66 std::map<std::string, std::list<MetadataParameter*>> m_parameterUpForStorageByName;
68 virtual const uint64_t findNextFreeSeriesIndex();
69 virtual const uint64_t findNextFreeQuantityIndex();
70 virtual const uint64_t findNextFreeParameterIndex();
72 bool quantityIsCorrectlySet(MetadataQuantity& _quantity);
73 bool parameterIsCorrectlySet(MetadataParameter& _parameter);
75 bool m_saveModel =
true;
Definition ModelComponent.h:42
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
std::list< UID > UIDList
Unique identifier list.
Definition CoreTypes.h:31