CRelativeFileNameParamComp.h
Go to the documentation of this file.
1 #ifndef ifile_CRelativeFileNameParamComp_included
2 #define ifile_CRelativeFileNameParamComp_included
3 
4 
5 // ACF includes
9 
10 
11 namespace ifile
12 {
13 
14 
16  virtual public IRelativeFilePath,
18 {
19 public:
21 
22  I_BEGIN_COMPONENT(CRelativeFileNameParamComp);
23  I_REGISTER_INTERFACE(IRelativeFilePath);
24  I_ASSIGN(m_relativeToCompPtr, "ReferencePath", "Reference path, relative to this file or directory internal path representation will be calculated", false, "ReferencePath");
25  I_ASSIGN_TO(m_relativeToModelCompPtr, m_relativeToCompPtr, false);
26  I_END_COMPONENT;
27 
29 
30  // reimplemented (ifile::IRelativeFilePath)
31  virtual QString GetBasePath() const;
32 
33  // reimplemented (ifile::IFileNameParam)
34  virtual const QString& GetPath() const;
35  virtual void SetPath(const QString& path);
36 
37  // reimplemented (iser::ISerializable)
38  virtual bool Serialize(iser::IArchive& archive);
39 
40 protected:
41  // reimplemented (icomp::CComponentBase)
42  virtual void OnComponentCreated();
43  virtual void OnComponentDestroyed();
44 
45 private:
46  I_REF(ifile::IFileNameParam, m_relativeToCompPtr);
47  I_REF(imod::IModel, m_relativeToModelCompPtr);
48 
49  mutable QString m_relativePath;
50 
51  imod::CModelUpdateBridge m_updateBridge;
52 };
53 
54 
55 } // namespace ifile
56 
57 
58 #endif // !ifile_CRelativeFileNameParamComp_included
59 
60 
virtual void SetPath(const QString &path)
Set path.
Common interface for any file system item name (e.g directory, file or URL path)
Represent input/output persistence archive.
Definition: IArchive.h:30
virtual const QString & GetPath() const
Get path.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable), typically delegated to itself.
Basic implementation of interface ifile::IFileNameParam as component.
Common interface for model objects, that supports Model/Observer design pattern.
Definition: IModel.h:23
virtual QString GetBasePath() const
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.

© 2007-2017 Witold Gantzke and Kirill Lepskiy