ICF 3.0.5.47
Technical documentation of ICF Libraries
IModelEditor.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#ifndef imod_IModelEditor_included
7#define imod_IModelEditor_included
8
9
10// ICF includes
11#include <istd/IPolymorphic.h>
12#include <istd/IChangeable.h>
13#include <imod/imod.h>
14
15
16namespace imod
17{
18
24class IModelEditor: virtual public istd::IPolymorphic
25{
26public:
31 {
35 CF_INIT_EDITOR = 0x3720694
36 };
37
43 virtual void UpdateEditor(const istd::IChangeable::ChangeSet& changeSet) = 0;
44
49 virtual void UpdateModelFromEditor() const = 0;
50
54 virtual bool IsReadOnly() const = 0;
55
60 virtual void SetReadOnly(bool state) = 0;
61};
62
63
64} // namespace imod
65
66
67#endif // !imod_IModelEditor_included
68
Common interface for an model editor.
ChangeFlags
Data model change notification flags.
@ CF_INIT_EDITOR
Called at begin of editor initialization.
virtual void UpdateEditor(const istd::IChangeable::ChangeSet &changeSet)=0
Updates editor with model data.
virtual bool IsReadOnly() const =0
Returns true if the model data can be changed.
virtual void UpdateModelFromEditor() const =0
Updates model from editor.
virtual void SetReadOnly(bool state)=0
Set flag that the model data can be changed.
Set of change flags (its IDs).
Definition IChangeable.h:38
This namespace containes basic implementation of Model/Observer design pattern This package is system...
Definition CModelBase.h:20

© Witold Gantzke and Kirill Lepskiy