Skip to content

Commit

Permalink
Add RiaSummaryCurveAddress to RiaSummaryCurveDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Sep 26, 2023
1 parent 5fd04c4 commit 7132265
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
30 changes: 30 additions & 0 deletions ApplicationLibCode/Application/RiaSummaryCurveDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "RiaSummaryCurveDefinition.h"
#include "RiaStdStringTools.h"
#include "RiaSummaryCurveAddress.h"

#include "RifSummaryReaderInterface.h"

Expand Down Expand Up @@ -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 )
{
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand All @@ -82,6 +96,14 @@ RimSummaryCaseCollection* RiaSummaryCurveDefinition::ensemble() const
return m_ensemble;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSummaryCurveDefinition::setEnsemble( RimSummaryCaseCollection* ensemble )
{
m_ensemble = ensemble;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -138,6 +160,14 @@ RifEclipseSummaryAddress RiaSummaryCurveDefinition::summaryAddressX() const
return m_summaryAddressX;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaSummaryCurveAddress RiaSummaryCurveDefinition::summaryCurveAddress() const
{
return RiaSummaryCurveAddress( m_summaryAddressX, m_summaryAddressY );
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
17 changes: 12 additions & 5 deletions ApplicationLibCode/Application/RiaSummaryCurveDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

class RimSummaryCase;
class RimSummaryCaseCollection;
class RiaSummaryCurveAddress;

//==================================================================================================
///
Expand All @@ -40,20 +41,26 @@ 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 );
void setSummaryAddressX( const RifEclipseSummaryAddress& summaryAddress );
RimSummaryCase* summaryCaseX() const;
RifEclipseSummaryAddress summaryAddressX() const;

RiaSummaryCurveAddress summaryCurveAddress() const;

void setIdentifierText( SummaryCategory category, const std::string& name );

bool operator<( const RiaSummaryCurveDefinition& other ) const;
Expand Down

0 comments on commit 7132265

Please sign in to comment.