version.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) Electronic Arts Inc. All rights reserved.
  3. ///////////////////////////////////////////////////////////////////////////////
  4. #ifndef EATHREAD_VERSION_H
  5. #define EATHREAD_VERSION_H
  6. #include <eathread/internal/config.h>
  7. #if defined(EA_PRAGMA_ONCE_SUPPORTED)
  8. #pragma once // Some compilers (e.g. VC++) benefit significantly from using this. We've measured 3-4% build speed improvements in apps as a result.
  9. #endif
  10. namespace EA
  11. {
  12. namespace Thread
  13. {
  14. /// Version contains the version of the library when it was built.
  15. /// This can be used to verify the correct version has been linked
  16. /// into the executable or loaded by the O/S (in the case of a DLL).
  17. struct Version
  18. {
  19. int mMajor;
  20. int mMinor;
  21. int mPatch;
  22. };
  23. /// Get the library version information.
  24. EATHREADLIB_API const Version *GetVersion();
  25. /// Check that the linked/loaded library is the same as the headers
  26. /// are expecting.
  27. ///
  28. /// If the version numbers passed to CheckVersion match those
  29. /// built into the library when it was compiled, true is returned.
  30. /// If not, false is returned.
  31. EATHREADLIB_API bool CheckVersion(int majorVersion, int minorVersion, int patchVersion);
  32. }
  33. }
  34. #endif