|
| 1 | +#pragma once |
| 2 | +// Copyright © 2022 Andy Maloney <[email protected]> |
| 3 | +// SPDX-License-Identifier: MIT |
| 4 | + |
| 5 | +/// @file E57Version.h ASTM & libE57Format version information. |
| 6 | + |
| 7 | +#include <string> |
| 8 | + |
| 9 | +#include "E57Export.h" |
| 10 | + |
| 11 | +namespace e57 |
| 12 | +{ |
| 13 | + namespace Version |
| 14 | + { |
| 15 | + /*! |
| 16 | + @brief Get the version of the ASTM E57 standard that libE57Format supports. |
| 17 | +
|
| 18 | + @returns The version as a string (e.g. "1.0") |
| 19 | + */ |
| 20 | + E57_DLL std::string astm(); |
| 21 | + |
| 22 | + /*! |
| 23 | + @brief Get the major version of the ASTM E57 standard that libE57Format supports. |
| 24 | +
|
| 25 | + @returns The major version |
| 26 | + */ |
| 27 | + E57_DLL uint32_t astmMajor(); |
| 28 | + |
| 29 | + /*! |
| 30 | + @brief Get the minor version of the ASTM E57 standard that libE57Format supports. |
| 31 | +
|
| 32 | + @returns The minor version |
| 33 | + */ |
| 34 | + E57_DLL uint32_t astmMinor(); |
| 35 | + |
| 36 | + /*! |
| 37 | + @brief Get the version of libE57Format library. |
| 38 | +
|
| 39 | + @returns The version as a string (e.g. "E57Format-3.0.0-x86_64-darwin"). |
| 40 | + */ |
| 41 | + E57_DLL std::string library(); |
| 42 | + |
| 43 | + /*! |
| 44 | + @brief Get the version of ASTM E57 standard that the API implementation supports, and library |
| 45 | + id string. |
| 46 | +
|
| 47 | + @param [out] astmMajor The major version number of the ASTM E57 standard supported. |
| 48 | + @param [out] astmMinor The minor version number of the ASTM E57 standard supported. |
| 49 | + @param [out] libraryId A string identifying the implementation of the API. |
| 50 | +
|
| 51 | + @details |
| 52 | + Since the E57 implementation may be dynamically linked underneath the API, the version string |
| 53 | + for the implementation and the ASTM version that it supports can't be determined at |
| 54 | + compile-time. This function returns these identifiers from the underlying implementation. |
| 55 | +
|
| 56 | + @throw No E57Exceptions. |
| 57 | + */ |
| 58 | + E57_DLL void get( uint32_t &astmMajor, uint32_t &astmMinor, std::string &libraryId ); |
| 59 | + } |
| 60 | + |
| 61 | + namespace Utilities |
| 62 | + { |
| 63 | + /*! |
| 64 | + @copydetails Version::get() |
| 65 | + @deprecated Will be removed in 4.0. Use Version::get() or other functions in the Version |
| 66 | + namespace. |
| 67 | + */ |
| 68 | + [[deprecated( "Will be removed in 4.0. Use Version::get() or other functions in the Version " |
| 69 | + "namespace." )]] E57_DLL void |
| 70 | + getVersions( int &astmMajor, int &astmMinor, std::string &libraryId ); |
| 71 | + } |
| 72 | +} |
0 commit comments