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", true, "ReadTransformationFile");
27  I_ASSIGN(m_xslWriteFilePath, "WriteTransformationFile", "Transformation file for writing action", true, "WriteTransformationFile");
28  I_END_COMPONENT;
29 
30  // reimplemented (ifile::IFilePersistence)
31  virtual int LoadFromFile(istd::IChangeable& data, const QString& filePath = QString()) const;
32  virtual int SaveToFile(const istd::IChangeable& data, const QString& filePath = QString()) const;
33 
34 protected:
38  virtual void OnReadError(const iser::IArchive& archive, const istd::IChangeable& data, const QString& filePath) const;
39 
40 private:
41  I_REF(ifile::IFileNameParam, m_xslReadFilePath);
42  I_REF(ifile::IFileNameParam, m_xslWriteFilePath);
43 };
44 
45 
46 } // namespace iqtex
47 
48 
49 #endif // !iqtex_CXslSerializerComp_included
50 
51 
virtual int LoadFromFile(istd::IChangeable &data, const QString &filePath=QString()) 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.
virtual int SaveToFile(const istd::IChangeable &data, const QString &filePath=QString()) const
ifile::CFileSerializerCompBase BaseClass

© 2007-2011 Witold Gantzke and Kirill Lepskiy