Version.hpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ///
  2. /// \file System/Version.hpp
  3. ///
  4. /// Version information for the library.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2013-2018 Josh Blum
  8. /// 2020-2021 Nicholas Corgan
  9. /// SPDX-License-Identifier: BSL-1.0
  10. ///
  11. #pragma once
  12. #include <Pothos/Config.hpp>
  13. #include <string>
  14. /*!
  15. * API version number which can be used as a preprocessor check.
  16. * The format of the version number is encoded as follows:
  17. * <b>(major << 24) | (minor << 16) | (16 bit increment)</b>.
  18. * Where the increment can be used to indicate implementation
  19. * changes, fixes, or API additions within a minor release series.
  20. *
  21. * The macro is typically used in an application as follows:
  22. * \code
  23. * #if defined(POTHOS_API_VERSION) && (POTHOS_API_VERSION >= 0x00001234)
  24. * // Use a newer feature from the Pothos framework API
  25. * #endif
  26. * \endcode
  27. */
  28. #define POTHOS_API_VERSION 0x00070000
  29. /*!
  30. * ABI Version Information - incremented when the ABI is changed.
  31. * The ABI version format is <b>major.minor-bump</b>. The <i>major.minor</i>
  32. * comes from the in-progress library version when the change was made,
  33. * and <i>bump</i> signifies a change to the ABI during library development.
  34. * The ABI should remain constant across patch releases of the library.
  35. */
  36. #define POTHOS_ABI_VERSION "0.7-4"
  37. namespace Pothos {
  38. namespace System {
  39. /*!
  40. * Get the Pothos framework API version as a string.
  41. * The format of the version string is <b>major.minor.increment</b>,
  42. * where the digits are taken directly from <b>POTHOS_API_VERSION</b>.
  43. */
  44. POTHOS_API std::string getApiVersion(void);
  45. /*!
  46. * Get the ABI version string that the library was built against.
  47. * A client can compare <b>POTHOS_ABI_VERSION</b> to getAbiVersion()
  48. * to check for ABI incompatibility before using the library.
  49. * If the values are not equal then the client code was
  50. * compiled against a different ABI than the library.
  51. */
  52. POTHOS_API std::string getAbiVersion(void);
  53. /*!
  54. * Get the library version and build information string.
  55. * The format of the version string is <b>major.minor.patch-buildInfo</b>.
  56. * This function is commonly used to identify the software back-end
  57. * to the user for command-line utilities and graphical applications.
  58. */
  59. POTHOS_API std::string getLibVersion(void);
  60. } //namespace System
  61. } //namespace Pothos