mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
764fb65e8e
clang-tidy : Remove redundant 'virtual' and add 'override'
59 lines
1.7 KiB
C++
59 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "cafPdmFieldCapability.h"
|
|
#include <QString>
|
|
|
|
class QXmlStreamReader;
|
|
class QXmlStreamWriter;
|
|
|
|
namespace caf
|
|
{
|
|
|
|
class PdmFieldHandle;
|
|
class PdmObjectFactory;
|
|
class PdmReferenceHelper;
|
|
|
|
|
|
//==================================================================================================
|
|
//
|
|
//
|
|
//
|
|
//==================================================================================================
|
|
class PdmXmlFieldHandle : public PdmFieldCapability
|
|
{
|
|
public:
|
|
PdmXmlFieldHandle(PdmFieldHandle* owner , bool giveOwnership);
|
|
~PdmXmlFieldHandle() override { }
|
|
|
|
PdmFieldHandle* fieldHandle() { return m_owner; }
|
|
const PdmFieldHandle* fieldHandle() const { return m_owner; }
|
|
|
|
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; }
|
|
|
|
QString childClassKeyword();
|
|
|
|
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) = 0;
|
|
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const = 0;
|
|
|
|
virtual void resolveReferences() { };
|
|
|
|
protected:
|
|
bool assertValid() const;
|
|
QString m_childClassKeyword; ///< Must be set in constructor of derived XmlFieldHandle
|
|
|
|
private:
|
|
bool m_isIOReadable;
|
|
bool m_isIOWritable;
|
|
|
|
PdmFieldHandle* m_owner;
|
|
};
|
|
|
|
} // End of namespace caf
|
|
|
|
#include "cafInternalPdmXmlFieldCapability.h"
|