CRegistryLoaderComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CRegistryLoaderComp_included
2 #define icmpstr_CRegistryLoaderComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QObject>
7 
8 // ACF includes
10 #include <ilog/TLoggerCompWrap.h>
11 
12 
13 namespace icmpstr
14 {
15 
16 
21  public QObject,
23  virtual public ifile::IFilePersistence
24 {
25  Q_OBJECT
26 
27 public:
29 
30  I_BEGIN_COMPONENT(CRegistryLoaderComp);
31  I_REGISTER_INTERFACE(ifile::IFileTypeInfo);
32  I_REGISTER_INTERFACE(ifile::IFilePersistence);
33  I_ASSIGN(m_versionInfoCompPtr, "VersionInfo", "Provide information about archive versions", false, "VersionInfo");
34  I_ASSIGN(m_supportOldFormatAttrPtr, "SupportOldFormat", "If enabled old format of registries (ARX) wil be supported", true, true);
35  I_END_COMPONENT;
36 
37  enum MessageId
38  {
41  };
42 
43  // reimplemented (ifile::IFilePersistence)
44  virtual bool IsOperationSupported(
45  const istd::IChangeable* dataObjectPtr,
46  const QString* filePathPtr,
47  int flags,
48  bool beQuiet) const;
49  virtual int LoadFromFile(
50  istd::IChangeable& data,
51  const QString& filePath = QString(),
52  ibase::IProgressManager* progressManagerPtr = NULL) const;
53  virtual int SaveToFile(
54  const istd::IChangeable& data,
55  const QString& filePath = QString(),
56  ibase::IProgressManager* progressManagerPtr = NULL) const;
57 
58  // reimplemented (ifile::IFileTypeInfo)
59  virtual bool GetFileExtensions(QStringList& result, const istd::IChangeable* dataObjectPtr = NULL, int flags = -1, bool doAppend = false) const;
60  virtual QString GetTypeDescription(const QString* extensionPtr = NULL) const;
61 
62 protected:
63  QString GetLayoutPath(const QString& registryPath, bool oldFormat) const;
64 
65  using QObject::tr;
66 
67 private:
68  I_REF(iser::IVersionInfo, m_versionInfoCompPtr);
69  I_ATTR(bool, m_supportOldFormatAttrPtr);
70 };
71 
72 
73 } // namespace icmpstr
74 
75 
76 #endif // !icmpstr_CRegistryLoaderComp_included
77 
78 
virtual int LoadFromFile(istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
Special registry loader supporting of loading layout data.
ilog::CLoggerComponentBase BaseClass
virtual int SaveToFile(const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
virtual QString GetTypeDescription(const QString *extensionPtr=NULL) const
QString GetLayoutPath(const QString &registryPath, bool oldFormat) const
virtual bool GetFileExtensions(QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const
virtual bool IsOperationSupported(const istd::IChangeable *dataObjectPtr, const QString *filePathPtr, int flags, bool beQuiet) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy