ICF 3.0.5.47
Technical documentation of ICF Libraries
CStandardDocumentMetaInfo.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QMap>
11
12// ICF includes
13#include <iser/ISerializable.h>
15
16
17namespace idoc
18{
19
20
25 virtual public IDocumentMetaInfo,
26 virtual public iser::ISerializable
27{
28public:
29 // reimplemented (idoc::IDocumentMetaInfo)
30 MetaInfoTypes GetMetaInfoTypes(bool allowReadOnly = true) const override;
31 QVariant GetMetaInfo(int metaInfoType) const override;
32 bool SetMetaInfo(int metaInfoType, const QVariant& metaInfo) override;
33 QString GetMetaInfoName(int metaInfoType) const override;
34 QString GetMetaInfoDescription(int metaInfoType) const override;
35 bool IsMetaInfoWritable(int metaInfoType) const override;
36
37 // reimplemented (iser::ISerializable)
38 bool Serialize(iser::IArchive& archive) override;
39
40 // reimplemented (istd::IChangeable)
41 bool IsEqual(const IChangeable& object) const override;
42 bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
43 std::unique_ptr<istd::IChangeable> CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
45
46private:
47 typedef QMap<int, QVariant> MetaInfoMap;
48 MetaInfoMap m_infosMap;
49};
50
51
52} // namespace idoc
53
54
Implementation of the basic document's meta information.
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
bool SetMetaInfo(int metaInfoType, const QVariant &metaInfo) override
Set new document's meta information for a given meta type.
QVariant GetMetaInfo(int metaInfoType) const override
Get document's meta info.
QString GetMetaInfoName(int metaInfoType) const override
Get a human readable name for a given meta information type.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
MetaInfoTypes GetMetaInfoTypes(bool allowReadOnly=true) const override
Get list of contained meta info types.
QString GetMetaInfoDescription(int metaInfoType) const override
Get a human readable description for a given meta information type.
bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
bool IsEqual(const IChangeable &object) const override
bool IsMetaInfoWritable(int metaInfoType) const override
Check if meta information can be changed.
Interface for document meta-information.
Represent input/output persistence archive.
Definition IArchive.h:33
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.
Contains the system indenendent basic implementations of Document/View design pattern.

© Witold Gantzke and Kirill Lepskiy