ACF $AcfVersion:0$
CStandardDocumentMetaInfo.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QMap>
7
8// ACF includes
11
12
13namespace idoc
14{
15
16
77 virtual public IDocumentMetaInfo,
78 virtual public iser::ISerializable
79{
80public:
81 // reimplemented (idoc::IDocumentMetaInfo)
82 virtual MetaInfoTypes GetMetaInfoTypes(bool allowReadOnly = true) const override;
83 virtual QVariant GetMetaInfo(int metaInfoType) const override;
84 virtual bool SetMetaInfo(int metaInfoType, const QVariant& metaInfo) override;
85 virtual void RemoveMetaInfo(int metaInfoType) override;
86 virtual QByteArray GetMetaInfoId(int metaInfoType) const override;
87 virtual QString GetMetaInfoName(int metaInfoType) const override;
88 virtual QString GetMetaInfoDescription(int metaInfoType) const override;
89 virtual bool IsMetaInfoWritable(int metaInfoType) const override;
90
91 // reimplemented (iser::ISerializable)
92 virtual bool Serialize(iser::IArchive& archive) override;
93
94 // reimplemented (istd::IChangeable)
95 virtual bool IsEqual(const IChangeable& object) const override;
96 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
98 virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS) override;
99
100private:
101 typedef QMap<int, QVariant> MetaInfoMap;
102 MetaInfoMap m_infosMap;
103};
104
105
106} // namespace idoc
107
108
109
110
Implementation of the basic document's meta information.
virtual QString GetMetaInfoDescription(int metaInfoType) const override
Get a human readable description for a given meta information type.
virtual bool IsEqual(const IChangeable &object) const override
virtual MetaInfoTypes GetMetaInfoTypes(bool allowReadOnly=true) const override
Get list of contained meta info types.
virtual bool IsMetaInfoWritable(int metaInfoType) const override
Check if meta information can be changed.
virtual QVariant GetMetaInfo(int metaInfoType) const override
Get document's meta info.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
virtual bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
virtual bool SetMetaInfo(int metaInfoType, const QVariant &metaInfo) override
Set new document's meta information for a given meta type.
virtual void RemoveMetaInfo(int metaInfoType) override
Remove document's meta information for a given meta type.
virtual istd::TUniqueInterfacePtr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual QByteArray GetMetaInfoId(int metaInfoType) const override
Get an unique ID of the meta information.
virtual QString GetMetaInfoName(int metaInfoType) const override
Get a human readable name for a given meta information type.
Interface for document meta-information.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common class for all classes which objects can be archived or restored from archive.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Unique ownership smart pointer for interface types.
Contains the system independent basic implementations of Document/View design pattern.