CXslSerializerComp.h
Go to the documentation of this file.
1 #ifndef iqtex_CXslSerializerComp_included
2 #define iqtex_CXslSerializerComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
10 #include <ifile/IFileNameParam.h>
11 
12 
13 namespace iqtex
14 {
15 
16 
21 {
22 public:
24 
25  I_BEGIN_COMPONENT(CXslSerializerComp);
26  I_ASSIGN(m_xslReadFilePath, "ReadTransformationFile", "Transformation file for reading action", false, "ReadTransformationFile");
27  I_ASSIGN(m_xslWriteFilePath, "WriteTransformationFile", "Transformation file for writing action", false, "WriteTransformationFile");
28  I_END_COMPONENT;
29 
30  // reimplemented (ifile::IFilePersistence)
31  virtual bool IsOperationSupported(
32  const istd::IChangeable* dataObjectPtr,
33  const QString* filePathPtr = NULL,
34  int flags = -1,
35  bool beQuiet = true) const;
36  virtual int LoadFromFile(
37  istd::IChangeable& data,
38  const QString& filePath = QString(),
39  ibase::IProgressManager* progressManagerPtr = NULL) const;
40  virtual int SaveToFile(
41  const istd::IChangeable& data,
42  const QString& filePath = QString(),
43  ibase::IProgressManager* progressManagerPtr = NULL) const;
44 
45 protected:
49  virtual void OnReadError(const iser::IArchive& archive, const istd::IChangeable& data, const QString& filePath) const;
50 
51 private:
52  I_REF(ifile::IFileNameParam, m_xslReadFilePath);
53  I_REF(ifile::IFileNameParam, m_xslWriteFilePath);
54 };
55 
56 
57 } // namespace iqtex
58 
59 
60 #endif // !iqtex_CXslSerializerComp_included
61 
62 
virtual int SaveToFile(const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
virtual int LoadFromFile(istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
virtual bool IsOperationSupported(const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=NULL, int flags=-1, bool beQuiet=true) const
Template implementation of file serializer using loading and storing archive implementation.
virtual void OnReadError(const iser::IArchive &archive, const istd::IChangeable &data, const QString &filePath) const
Called if read error is occured.
ifile::CFileSerializerCompBase BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy