///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) Statoil ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include //================================================================================================== // // //================================================================================================== class RifEclipseSummaryAddress { public: // Based on list in ecl_smspec.c and list of types taken from Eclipse Reference Manual ecl_rm_2011.1.pdf enum SummaryVarCategory { SUMMARY_WELL, // W SUMMARY_WELL_COMPLETION, // C SUMMARY_GROUP, // G SUMMARY_FIELD, // F SUMMARY_REGION, // R SUMMARY_MISC, // SUMMARY_BLOCK, // B SUMMARY_BLOCK_LGR, // LB SUMMARY_AQUIFIER, // A SUMMARY_SEGMENT, // S SUMMARY_SEGMENT_RIVER // SR }; public: RifEclipseSummaryAddress(const std::string& ertSummaryVarId); RifEclipseSummaryAddress(SummaryVarCategory category, const std::string& simulationItemName, const std::string& quantityName); SummaryVarCategory category() const; std::string simulationItemName() const; std::string quantityName() const; std::string ertSummaryVarId() const; static std::string categoryName(SummaryVarCategory category); private: static std::string toErtSummaryVarId(SummaryVarCategory category, const std::string& simulationItemName, const std::string& quantityName); static void fromErtSummaryVarId(const std::string& ertSummaryVarId, SummaryVarCategory* category, std::string* simulationItemName, std::string* quantityName); static std::string prefixForCategory(SummaryVarCategory category); static SummaryVarCategory categoryFromErtSummaryVarId(const std::string& ertSummaryVarId); private: std::string m_ertSummaryVarId; SummaryVarCategory m_variableCategory; std::string m_simulationItemName; std::string m_quantityName; };