You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.7 KiB

1 year ago
  1. //
  2. // cversion.h
  3. // m17ref
  4. //
  5. // Created by Jean-Luc Deltombe (LX3JL) on 05/01/2018.
  6. // Copyright © 2015 Jean-Luc Deltombe (LX3JL). All rights reserved.
  7. //
  8. // ----------------------------------------------------------------------------
  9. // This file is part of m17ref.
  10. //
  11. // m17ref is free software: you can redistribute it and/or modify
  12. // it under the terms of the GNU General Public License as published by
  13. // the Free Software Foundation, either version 3 of the License, or
  14. // (at your option) any later version.
  15. //
  16. // m17ref is distributed in the hope that it will be useful,
  17. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. // GNU General Public License for more details.
  20. //
  21. // You should have received a copy of the GNU General Public License
  22. // with this software. If not, see <http://www.gnu.org/licenses/>.
  23. // ----------------------------------------------------------------------------
  24. #ifndef cversion_h
  25. #define cversion_h
  26. ////////////////////////////////////////////////////////////////////////////////////////
  27. // class
  28. class CVersion
  29. {
  30. public:
  31. // constructor
  32. CVersion();
  33. CVersion(int, int, int);
  34. // get
  35. int GetMajor(void) const { return m_iMajor; }
  36. int GetMinor(void) const { return m_iMinor; }
  37. int GetRevision(void) const { return m_iRevision; }
  38. // comparaison
  39. bool IsEqualOrHigherTo(const CVersion &) const;
  40. // operator
  41. bool operator ==(const CVersion &) const;
  42. protected:
  43. // data
  44. int m_iMajor;
  45. int m_iMinor;
  46. int m_iRevision;
  47. };
  48. ////////////////////////////////////////////////////////////////////////////////////////
  49. #endif /* cversion_h */