LocalFileMng.h 1.2 KB

123456789101112131415161718192021222324252627282930
  1. #ifndef LFILEMNG_H
  2. #define LFILEMNG_H
  3. #include <iostream>
  4. #include <fstream>
  5. #include <vector>
  6. #include <string>
  7. #include <QDomDocument>
  8. class LocalFileMng
  9. {
  10. public:
  11. LocalFileMng();
  12. ~LocalFileMng();
  13. std::vector<QString> getallPatternList(){
  14. return m_allPatternList;
  15. }
  16. static QString readXmlString( QDomNode , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
  17. static float readXmlFloat( QDomNode , const QString& nodeName, float defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
  18. static int readXmlInt( QDomNode , const QString& nodeName, int defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
  19. static bool readXmlBool( QDomNode , const QString& nodeName, bool defaultValue, bool bShouldExists = true , bool tinyXmlCompatMode = false );
  20. static void convertFromTinyXMLString( QByteArray* str );
  21. static bool checkTinyXMLCompatMode( const QString& filename );
  22. static QDomDocument openXmlDocument( const QString& filename );
  23. std::vector<QString> m_allPatternList;
  24. };
  25. #endif //LFILEMNG_H