diff --git a/ApplicationLibCode/GeoMech/OdbReader/RifInpIncludeReader.h b/ApplicationLibCode/GeoMech/OdbReader/RifInpIncludeReader.h index 27028edf44..45848e91d5 100644 --- a/ApplicationLibCode/GeoMech/OdbReader/RifInpIncludeReader.h +++ b/ApplicationLibCode/GeoMech/OdbReader/RifInpIncludeReader.h @@ -17,3 +17,29 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once + +#include +#include +#include + +//================================================================================================== +// +//================================================================================================== +class RifInpReader +{ +public: + RifInpIncludeReader(); + ~RifInpIncludeReader() override; + + bool openFile( const std::string& fileName, std::string* errorMessage ); + bool isOpen() const; + + bool + + +private: + void close(); + +private: + std::ifstream m_stream; +}; diff --git a/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.cpp b/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.cpp index 29a447cc4c..39863dc65f 100644 --- a/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.cpp +++ b/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.cpp @@ -643,3 +643,19 @@ void RifInpReader::readIntegrationPointField( const std::string& { CVF_ASSERT( resultValues ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector RifInpReader::propertyData( std::string propertyName, int partId ) const +{ + if ( m_propertyPartData.count( propertyName ) > 0 ) + { + if ( m_propertyPartData.at( propertyName ).count( partId ) > 0 ) + { + return m_propertyPartData.at( propertyName ).at( partId ); + } + } + + return {}; +} diff --git a/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.h b/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.h index b0a1ab5f4f..4ef7fd7991 100644 --- a/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.h +++ b/ApplicationLibCode/GeoMech/OdbReader/RifInpReader.h @@ -50,8 +50,6 @@ struct RifInpIncludeEntry //================================================================================================== // -// Data interface base class -// //================================================================================================== class RifInpReader : public RifGeoMechReaderInterface { @@ -94,6 +92,8 @@ class RifInpReader : public RifGeoMechReaderInterface int frameIndex, std::vector*>* resultValues ) override; + const std::vector propertyData( std::string propertyName, int partId ) const; + private: void close(); @@ -115,10 +115,11 @@ class RifInpReader : public RifGeoMechReaderInterface std::vector& includeEntries ); private: - bool m_enableIncludes; - std::map> m_partElementSetNames; - std::vector m_stepNames; - std::vector m_includeEntries; - std::ifstream m_stream; - std::filesystem::path m_inputPath; + bool m_enableIncludes; + std::map> m_partElementSetNames; + std::vector m_stepNames; + std::vector m_includeEntries; + std::ifstream m_stream; + std::filesystem::path m_inputPath; + std::map>> m_propertyPartData; };