#2360 Elm Props: Use correct index to id map

This commit is contained in:
Rebecca Cox
2018-01-12 11:21:59 +01:00
parent 6aa2d99587
commit b08e382dae
4 changed files with 107 additions and 12 deletions

View File

@@ -26,6 +26,7 @@
#include <map>
#include <string>
#include <unordered_map>
#include <vector>
//==================================================================================================
@@ -35,7 +36,7 @@
class RifElementPropertyReader : public cvf::Object
{
public:
RifElementPropertyReader();
RifElementPropertyReader(const std::vector<int>& elementIdxToId);
virtual ~RifElementPropertyReader();
void addFile(const std::string& fileName);
@@ -45,5 +46,11 @@ public:
std::map<std::string, std::vector<float>> readAllElementPropertiesInFileContainingField(const std::string& fieldName);
private:
std::map<std::string, RifElementPropertyMetadata> m_fields;
void makeElementIdToIdxMap();
static void outputWarningAboutWrongFileData();
private:
std::map<std::string, RifElementPropertyMetadata> m_fieldsMetaData;
std::vector<int> m_elementIdxToId;
std::unordered_map<int, int> m_elementIdToIdx;
};