CFileNameParamComp.h
Go to the documentation of this file.
1 #ifndef ifile_CFileNameParamComp_included
2 #define ifile_CFileNameParamComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <ifile/CFileNameParam.h>
8 
9 
10 namespace ifile
11 {
12 
13 
24  public icomp::CComponentBase,
25  public CFileNameParam
26 {
27 public:
30 
31  I_BEGIN_COMPONENT(CFileNameParamComp);
32  I_REGISTER_INTERFACE(iser::ISerializable);
33  I_REGISTER_INTERFACE(IFileNameParam);
34  I_ASSIGN(m_defaultDirAttrPtr, "DefaultPath", "Default path of file or directory", false, ".");
35  I_ASSIGN(m_pathTypeAttrPtr, "PathType", "Type of path: 0 - unknown, 1 - PT_FILE, 2 - PT_DIRECTORY, 3 - PT_URL", true, PT_UNKNOWN);
36  I_ASSIGN(m_initialPathCompPtr, "InitialPath", "If set, the current path will be initialized using specified file name component", false, "InitalPath");
37  I_END_COMPONENT;
38 
39  // reimplemented (ifile::IFileNameParam)
40  virtual int GetPathType() const;
41 
42 protected:
43  // reimplemented (icomp::CComponentBase)
44  virtual void OnComponentCreated();
45 
46 private:
47  I_ATTR(QString, m_defaultDirAttrPtr);
48  I_ATTR(int, m_pathTypeAttrPtr);
49  I_REF(ifile::IFileNameParam, m_initialPathCompPtr);
50 
51  static QString s_tempPathVariable;
52  static QString s_appNameVariable;
53  static QString s_companyNameVariable;
54  static QString s_publicSharedPathVariable;
55  static QString s_userHomePathVariable;
56 };
57 
58 
59 } // namespace ifile
60 
61 
62 #endif // !ifile_CFileNameParamComp_included
63 
64 
Basic implementation of interface ifile::IFileNameParam.
Base class for component implementation.
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
icomp::CComponentBase BaseClass
Common interface for any file system item name (e.g directory, file or URL path)
virtual int GetPathType() const
Get intended type of the path.
virtual void OnComponentCreated()
Basic implementation of interface ifile::IFileNameParam as component.

© 2007-2017 Witold Gantzke and Kirill Lepskiy