OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
DataCategorizationConsistencyChecker.h
Go to the documentation of this file.
1#pragma once
2#include <map>
3#include <string>
6
8{
9public:
15 bool isValidAllMSMDHaveParameterAndQuantities(std::map<std::string, MetadataAssemblyData>& allMetadataAssembliesByName);
16 bool isValidAllParameterAndQuantitiesReferenceSameTable(std::map<std::string, MetadataAssemblyData>& allMetadataAssembliesByName);
18
19private:
20 template <class T>
21 void AddFieldNameByFieldvalueSize(const std::map <std::string, std::list<T>>* fields ,std::map<uint64_t, std::list<std::string>>& outNumberOfParameter);
22};
23
24template<class T>
25inline void DataCategorizationConsistencyChecker::AddFieldNameByFieldvalueSize(const std::map<std::string, std::list<T>>* fields, std::map<uint64_t, std::list<std::string>>& outNumberOfParameter)
26{
27 for (const auto& field : *fields)
28 {
29 const std::list<T>& values = field.second;
30 const std::string& name = field.first;
31 outNumberOfParameter[values.size()].push_back(name);
32 }
33}
Container for groups of TableSelectionEntities that describe the same metadata categorization.
Definition DataCategorizationConsistencyChecker.h:8
bool isValidAllMSMDHaveParameterAndQuantities(std::map< std::string, MetadataAssemblyData > &allMetadataAssembliesByName)
Guarantees that the next pointer in the MetadataAssemblyData structs are all != nullptr.
Definition DataCategorizationConsistencyChecker.cpp:6
bool isValidQuantityAndParameterNumberMatches(KeyValuesExtractor &parameterData, KeyValuesExtractor &quantityData)
Definition DataCategorizationConsistencyChecker.cpp:74
bool isValidAllParameterAndQuantitiesReferenceSameTable(std::map< std::string, MetadataAssemblyData > &allMetadataAssembliesByName)
Definition DataCategorizationConsistencyChecker.cpp:34
Definition KeyValuesExtractor.h:13