xmlparam.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef XMLPARAM_H
  2. #define XMLPARAM_H
  3. #include <QtCore/qglobal.h>
  4. #include <string>
  5. #if defined(XMLPARAM_LIBRARY)
  6. # define XMLPARAMSHARED_EXPORT Q_DECL_EXPORT
  7. #else
  8. # define XMLPARAMSHARED_EXPORT Q_DECL_IMPORT
  9. #endif
  10. namespace iv {
  11. namespace xmlparam {
  12. class XMLPARAMSHARED_EXPORT Xmlparam
  13. {
  14. public:
  15. Xmlparam(std::string filepath);
  16. std::string GetParam(std::string paramname,std::string defaultvalue);
  17. std::string GetParam(std::string paramname,const char * strdefaultvalue);
  18. int GetParam(std::string paramname, int ndefaultvalue);
  19. double GetParam(std::string paramname, double dfdefvalue);
  20. float GetParam(std::string paramname, float fdefvalue);
  21. bool GetParam(std::string paramname, bool bdefValue);
  22. void GetParam(std::string paramname,std::string & strvalue,std::string defaultvalue);
  23. void GetParam(std::string paramname,std::string & strvalue,const char * strdefaultvalue);
  24. void GetParam(std::string paramname, int & nvalue, int ndefaultvalue);
  25. void GetParam(std::string paramname, double & dfvalue,double dfdefvalue);
  26. void GetParam(std::string paramname, float & fvalue, float fdefvalue);
  27. void GetParam(std::string paramname, bool & bvalue,bool bdefvalue);
  28. QString GetVersion();
  29. private:
  30. int * mpx;
  31. };
  32. }
  33. }
  34. #endif // XMLPARAM_H