Line data Source code
1 : // Copyright (c) 2011-2022 Made to Order Software Corp. All Rights Reserved
2 : //
3 : // https://snapwebsites.org/
4 : // contact@m2osw.com
5 : //
6 : // Permission is hereby granted, free of charge, to any person obtaining a
7 : // copy of this software and associated documentation files (the
8 : // "Software"), to deal in the Software without restriction, including
9 : // without limitation the rights to use, copy, modify, merge, publish,
10 : // distribute, sublicense, and/or sell copies of the Software, and to
11 : // permit persons to whom the Software is furnished to do so, subject to
12 : // the following conditions:
13 : //
14 : // The above copyright notice and this permission notice shall be included
15 : // in all copies or substantial portions of the Software.
16 : //
17 : // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 : // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 : // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 : // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 : // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 : // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 : // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 :
25 : #include "libexcept/version.h"
26 :
27 :
28 : namespace libexcept
29 : {
30 :
31 :
32 :
33 : /** \brief Return a string to the version of the library when it was compiled.
34 : *
35 : * This function returns the library version when it was compiled as a string.
36 : * It can be used to compare against a version you support (i.e. the version
37 : * your software was compiled against could be different.)
38 : *
39 : * \return A constant string that represents the library version.
40 : */
41 1 : char const * get_version_string()
42 : {
43 1 : return LIBEXCEPT_VERSION_STRING;
44 : }
45 :
46 : /** \brief Return the major version number.
47 : *
48 : * This function returns the library major version number when it was compiled
49 : * as an integer. It can be used to compare against a version you support.
50 : *
51 : * \return The library major version number when it was compiled.
52 : */
53 1 : int get_major_version()
54 : {
55 1 : return LIBEXCEPT_VERSION_MAJOR;
56 : }
57 :
58 : /** \brief Return the minor version number.
59 : *
60 : * This function returns the library minor version number when it was compiled
61 : * as an integer. It can be used to compare against a version you support.
62 : *
63 : * \return The library minor version number when it was compiled.
64 : */
65 1 : int get_minor_version()
66 : {
67 1 : return LIBEXCEPT_VERSION_MINOR;
68 : }
69 :
70 : /** \brief Return the patch version number.
71 : *
72 : * This function returns the library patch version number when it was compiled
73 : * as an integer. It can be used to compare against a version you support.
74 : *
75 : * \return The library minor version number when it was compiled.
76 : */
77 1 : int get_patch_version()
78 : {
79 1 : return LIBEXCEPT_VERSION_PATCH;
80 : }
81 :
82 :
83 : } // namespace libexcept
84 : // vim: ts=4 sw=4 et
|