mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
System : PdmPtrField - Remove PdmPointer interface and add operator()
This commit is contained in:
parent
917ee860d2
commit
5a7755fe0c
@ -119,7 +119,7 @@ QList<caf::PdmOptionItemInfo> RimMultiSnapshotDefinition::calculateValueOptions(
|
||||
}
|
||||
else if (fieldNeedingOptions == &selectedEclipseResults)
|
||||
{
|
||||
RimEclipseView* rimEclipseView = dynamic_cast<RimEclipseView*>(view().p());
|
||||
RimEclipseView* rimEclipseView = dynamic_cast<RimEclipseView*>(view());
|
||||
if (rimEclipseView)
|
||||
{
|
||||
QStringList varList;
|
||||
|
@ -509,11 +509,10 @@ TEST(BaseTest, PdmPtrField)
|
||||
EXPECT_EQ(ihd2, accessedIhd);
|
||||
accessedIhd = ihd1->m_ptrField.value();
|
||||
EXPECT_EQ(ihd2, accessedIhd);
|
||||
accessedIhd = ihd1->m_ptrField.v();
|
||||
|
||||
caf::PdmPointer<InheritedDemoObj> accessedPdmPtr;
|
||||
EXPECT_EQ(ihd2, accessedIhd);
|
||||
accessedPdmPtr = ihd1->m_ptrField.v();
|
||||
accessedPdmPtr = ihd1->m_ptrField();
|
||||
EXPECT_EQ(ihd2, accessedPdmPtr.p());
|
||||
accessedPdmPtr = ihd1->m_ptrField();
|
||||
EXPECT_EQ(ihd2, accessedPdmPtr.p());
|
||||
|
@ -55,9 +55,7 @@ public:
|
||||
|
||||
/*Conversion*/ operator DataType* () const { return m_fieldValue; }
|
||||
DataType* operator->() const { return m_fieldValue; }
|
||||
|
||||
const PdmPointer<DataType>& operator()() const { return m_fieldValue; }
|
||||
const PdmPointer<DataType>& v() const { return m_fieldValue; }
|
||||
DataType* operator()() const { return m_fieldValue; }
|
||||
|
||||
bool operator==(const DataTypePtr& fieldValue) { return m_fieldValue == fieldValue; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user