From 64a8a07f6ac08517dba7a98139f4e8cd21aa9359 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 3 Oct 2017 15:23:44 +0200 Subject: [PATCH] AppFwk : Add disableIO() to PdmXmlFieldHandle --- .../cafPdmXml/cafPdmXmlFieldHandle.cpp | 9 +++++++++ .../cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp index 15ecfc1df4..ca0e4f36e7 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp @@ -40,6 +40,15 @@ PdmXmlFieldHandle::PdmXmlFieldHandle(PdmFieldHandle* owner, bool giveOwnership) owner->addCapability(this, giveOwnership); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmXmlFieldHandle::disableIO() +{ + setIOReadable(false); + setIOWritable(false); +} + //-------------------------------------------------------------------------------------------------- /// Returns the classKeyword of the child class type, if this field is supposed to contain pointers /// to PdmObjectHandle derived onbjects. diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h index 8db7870ca7..631ce73765 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h @@ -30,6 +30,8 @@ public: bool isIOReadable() const { return m_isIOReadable; } bool isIOWritable() const { return m_isIOWritable; } + + void disableIO(); void setIOWritable(bool isWritable) { m_isIOWritable = isWritable; } void setIOReadable(bool isReadable) { m_isIOReadable = isReadable; }