mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#1813 Observed data: Functions to add observed data to collection
This commit is contained in:
parent
7bb7e4c5f9
commit
ae7430a697
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RimObservedDataCollection.h"
|
||||
#include "RimObservedData.h"
|
||||
#include "RimSummaryObservedDataFile.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimObservedDataCollection, "ObservedDataCollection");
|
||||
|
||||
@ -41,4 +42,35 @@ RimObservedDataCollection::RimObservedDataCollection()
|
||||
RimObservedDataCollection::~RimObservedDataCollection()
|
||||
{
|
||||
m_observedDataArray.deleteAllChildObjects();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimObservedDataCollection::removeObservedData(RimObservedData* observedData)
|
||||
{
|
||||
m_observedDataArray.removeChildObject(observedData);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimObservedDataCollection::addObservedData(RimObservedData* observedData)
|
||||
{
|
||||
m_observedDataArray.push_back(observedData);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryObservedDataFile* RimObservedDataCollection::createAndAddObservedDataFromFileName(const QString& fileName)
|
||||
{
|
||||
RimSummaryObservedDataFile* newObservedData = new RimSummaryObservedDataFile();
|
||||
|
||||
this->m_observedDataArray.push_back(newObservedData);
|
||||
newObservedData->setSummaryHeaderFilename(fileName);
|
||||
newObservedData->updateOptionSensitivity();
|
||||
|
||||
return newObservedData;
|
||||
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RimObservedData;
|
||||
class RimSummaryObservedDataFile;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -32,6 +33,10 @@ public:
|
||||
RimObservedDataCollection();
|
||||
virtual ~RimObservedDataCollection();
|
||||
|
||||
void removeObservedData(RimObservedData* observedData);
|
||||
void addObservedData(RimObservedData* observedData);
|
||||
RimSummaryObservedDataFile* createAndAddObservedDataFromFileName(const QString& fileName);
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimObservedData*> m_observedDataArray;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user