diff --git a/ApplicationLibCode/Application/RiaSummaryCurveDefinition.cpp b/ApplicationLibCode/Application/RiaSummaryCurveDefinition.cpp index 424c5f67b3f..a6e5e4a4025 100644 --- a/ApplicationLibCode/Application/RiaSummaryCurveDefinition.cpp +++ b/ApplicationLibCode/Application/RiaSummaryCurveDefinition.cpp @@ -18,6 +18,7 @@ #include "RiaSummaryCurveDefinition.h" #include "RiaStdStringTools.h" +#include "RiaSummaryCurveAddress.h" #include "RifSummaryReaderInterface.h" @@ -66,6 +67,19 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* { } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RiaSummaryCurveAddress& summaryCurveAddress ) + : m_summaryCaseY( nullptr ) + , m_summaryAddressY( summaryCurveAddress.summaryAddressY() ) + , m_summaryCaseX( nullptr ) + , m_summaryAddressX( summaryCurveAddress.summaryAddressX() ) + , m_ensemble( ensemble ) + , m_isEnsembleCurve( true ) +{ +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -82,6 +96,14 @@ RimSummaryCaseCollection* RiaSummaryCurveDefinition::ensemble() const return m_ensemble; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryCurveDefinition::setEnsemble( RimSummaryCaseCollection* ensemble ) +{ + m_ensemble = ensemble; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -138,6 +160,14 @@ RifEclipseSummaryAddress RiaSummaryCurveDefinition::summaryAddressX() const return m_summaryAddressX; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaSummaryCurveAddress RiaSummaryCurveDefinition::summaryCurveAddress() const +{ + return RiaSummaryCurveAddress( m_summaryAddressX, m_summaryAddressY ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/RiaSummaryCurveDefinition.h b/ApplicationLibCode/Application/RiaSummaryCurveDefinition.h index b59a3c4b76b..0132dfea778 100644 --- a/ApplicationLibCode/Application/RiaSummaryCurveDefinition.h +++ b/ApplicationLibCode/Application/RiaSummaryCurveDefinition.h @@ -30,6 +30,7 @@ class RimSummaryCase; class RimSummaryCaseCollection; +class RiaSummaryCurveAddress; //================================================================================================== /// @@ -40,13 +41,17 @@ class RiaSummaryCurveDefinition RiaSummaryCurveDefinition(); explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCaseY, const RifEclipseSummaryAddress& summaryAddressY, bool isEnsembleCurve ); explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddressY ); + explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RiaSummaryCurveAddress& summaryCurveAddress ); - // Y Axis - RimSummaryCase* summaryCaseY() const; - RifEclipseSummaryAddress summaryAddressY() const; + // X and Y Axis RimSummaryCaseCollection* ensemble() const; - bool isEnsembleCurve() const; - void setSummaryAddressY( const RifEclipseSummaryAddress& address ); + void setEnsemble( RimSummaryCaseCollection* ensemble ); + + // Y Axis + RimSummaryCase* summaryCaseY() const; + RifEclipseSummaryAddress summaryAddressY() const; + bool isEnsembleCurve() const; + void setSummaryAddressY( const RifEclipseSummaryAddress& address ); // X Axis void setSummaryCaseX( RimSummaryCase* summaryCase ); @@ -54,6 +59,8 @@ class RiaSummaryCurveDefinition RimSummaryCase* summaryCaseX() const; RifEclipseSummaryAddress summaryAddressX() const; + RiaSummaryCurveAddress summaryCurveAddress() const; + void setIdentifierText( SummaryCategory category, const std::string& name ); bool operator<( const RiaSummaryCurveDefinition& other ) const;