CSystemLocationComp.h
Go to the documentation of this file.
1 #ifndef ifile_CSystemLocationComp_included
2 #define ifile_CSystemLocationComp_included
3 
4 
5 // ACF includes
6 #include <iser/ISerializable.h>
7 #include <icomp/CComponentBase.h>
9 #include <ifile/IFileTypeInfo.h>
10 #include <ifile/IFileNameParam.h>
11 
12 
13 namespace ifile
14 {
15 
16 
21  public icomp::CComponentBase,
22  virtual public ifile::IFileNameParam
23 {
24 public:
26 
28  {
33 
38 
43 
49 
55 
61  };
62 
63  I_BEGIN_COMPONENT(CSystemLocationComp);
64  I_REGISTER_INTERFACE(iser::ISerializable);
65  I_REGISTER_INTERFACE(ifile::IFileNameParam);
66  I_ASSIGN(m_locationTypeAttrPtr, "LocationType", "Type of system location:\n0 - user's desktop directory\n1 - user's document\n2 - user's fonts\n3 - user's applications\n4 - users music\n5 - user's movies\n6 - user's movies\n7 - system's temporary directory\n8 - user's home directory\n9 - directory location where persistent application data can be stored\n10 - Returns a directory location where user-specific non-essential (cached) data should be written\n100 - Working directory for the running executable\n101 - Directory of the executable file\n102 - Path to the executable file\n103 - Application's local content folder\n104 - User-indepedent company data folder\n105 - User-indepedent application's data folder", true, 0);
67  I_ASSIGN(m_applicationInfoCompPtr, "ApplicationInfo", "Application info", false, "ApplicationInfo");
68  I_END_COMPONENT;
69 
70  // reimplemented (ifile::IFileNameParam)
71  virtual int GetPathType() const;
72  virtual const QString& GetPath() const;
73  virtual void SetPath(const QString& path);
74 
75  // reimplemented (iser::ISerializable)
76  virtual bool Serialize(iser::IArchive& archive);
77 
78 protected:
79  // reimplemented (icomp::CComponentBase)
80  virtual void OnComponentCreated();
81 
82 private:
83  I_REF(ibase::IApplicationInfo, m_applicationInfoCompPtr);
84 
85  I_ATTR(int, m_locationTypeAttrPtr);
86 
87  QString m_storagePath;
88 };
89 
90 
91 } // namespace ifile
92 
93 
94 #endif // !ifile_CSystemLocationComp_included
95 
96 
User-independent application's data folder.
Base class for component implementation.
icomp::CComponentBase BaseClass
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
User- and application-independent company data folder.
Directory for the application's content.
Common interface for any file system item name (e.g directory, file or URL path)
virtual const QString & GetPath() const
Get path.
Represent input/output persistence archive.
Definition: IArchive.h:30
virtual void SetPath(const QString &path)
Set path.
This interface provides some information about the application.
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
Provider of system pathes.
virtual int GetPathType() const
Get intended type of the path.
virtual void OnComponentCreated()
Path to the directory where the executable file is located.
Working directory of the application.

© 2007-2017 Witold Gantzke and Kirill Lepskiy