|
| 1 | +/** @file |
| 2 | + @brief Header for accessing runtime version information. |
| 3 | +
|
| 4 | + Generated by running: |
| 5 | +
|
| 6 | + `cmake -P src/osvr/GenerateGetRuntimeVersion.cmake` |
| 7 | +
|
| 8 | + @date 2015 |
| 9 | +
|
| 10 | + @author |
| 11 | + Sensics, Inc. |
| 12 | + <http://sensics.com/osvr> |
| 13 | +*/ |
| 14 | + |
| 15 | +// Copyright 2015 Sensics, Inc. |
| 16 | +// |
| 17 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 18 | +// you may not use this file except in compliance with the License. |
| 19 | +// You may obtain a copy of the License at |
| 20 | +// |
| 21 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 22 | +// |
| 23 | +// Unless required by applicable law or agreed to in writing, software |
| 24 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 25 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 26 | +// See the License for the specific language governing permissions and |
| 27 | +// limitations under the License. |
| 28 | + |
| 29 | +#ifndef INCLUDED_GetRuntimeVersion_h_GUID_6FCB818C_A087_4CB8_E0C4_29B472CCE703 |
| 30 | +#define INCLUDED_GetRuntimeVersion_h_GUID_6FCB818C_A087_4CB8_E0C4_29B472CCE703 |
| 31 | + |
| 32 | +// Internal Includes |
| 33 | +#include <osvr/Connection/Export.h> |
| 34 | +#include <osvr/Util/RuntimeNumericVersion.h> |
| 35 | + |
| 36 | +// Library/third-party includes |
| 37 | +// - none |
| 38 | + |
| 39 | +// Standard includes |
| 40 | +// - none |
| 41 | + |
| 42 | +namespace osvr { |
| 43 | +namespace connection { |
| 44 | + /// @brief Returns the value of the version component (zero-indexed) |
| 45 | + /// specified, in the inclusive range [0,3]. |
| 46 | + /// @return version component value, or 0 if component out of range. |
| 47 | + OSVR_CONNECTION_EXPORT util::NumericVersionComponent |
| 48 | + getVersionComponent(uint8_t componentIndex); |
| 49 | + |
| 50 | + /// @brief Gets all numeric components of the runtime version in a tuple. |
| 51 | + OSVR_CONNECTION_EXPORT util::RuntimeNumericVersion getRuntimeNumericVersion(); |
| 52 | + |
| 53 | + /// @brief Gets the Git commit hash corresponding to this library build. |
| 54 | + /// @returns an empty string if the commit hash could not be detected. |
| 55 | + OSVR_CONNECTION_EXPORT const char *getCommit(); |
| 56 | + |
| 57 | + /// @brief Gets the full descriptive version string, typically including the |
| 58 | + /// numerical version components and the commit hash. |
| 59 | + OSVR_CONNECTION_EXPORT const char *getVersionString(); |
| 60 | + |
| 61 | + /// @brief If this was built by the CI, return the "Build Tag" the CI |
| 62 | + /// associated with the build job. (Unrelated to git tags.) |
| 63 | + /// @returns empty string if we don't have a CI build tag recorded. |
| 64 | + OSVR_CONNECTION_EXPORT const char *getCIBuildTag(); |
| 65 | + |
| 66 | + /// @brief Does this build identify itself as a dev build, rather than a |
| 67 | + /// CI-build "production" build? This is not necessarily 100% accurate - for |
| 68 | + /// informational purposes only. |
| 69 | + OSVR_CONNECTION_EXPORT bool isKnownDevBuild(); |
| 70 | + |
| 71 | + /// @brief Gets the name of this library/module, or an empty string if the |
| 72 | + /// build system did not incorporate this information into the build. |
| 73 | + OSVR_CONNECTION_EXPORT const char *getModuleName(); |
| 74 | +} // namespace connection |
| 75 | +} // namespace osvr |
| 76 | + |
| 77 | +#endif // INCLUDED_GetRuntimeVersion_h_GUID_6FCB818C_A087_4CB8_E0C4_29B472CCE703 |
0 commit comments