System : PdmPtrField - Remove PdmPointer interface and add operator()

This commit is contained in:
Magne Sjaastad
2017-06-30 13:35:58 +02:00
parent 917ee860d2
commit 5a7755fe0c
3 changed files with 3 additions and 6 deletions

View File

@@ -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());

View File

@@ -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; }