Line data Source code
1 : /*
2 : * File:
3 : * libutf8/version.cpp -- UTF-8 chacracter handling
4 : *
5 : * License:
6 : * Copyright (c) 2000-2019 Made to Order Software Corp. All Rights Reserved
7 : *
8 : * https://snapwebsites.org/
9 : * contact@m2osw.com
10 : *
11 : * This program is free software; you can redistribute it and/or modify
12 : * it under the terms of the GNU General Public License as published by
13 : * the Free Software Foundation; either version 2 of the License, or
14 : * (at your option) any later version.
15 : *
16 : * This program is distributed in the hope that it will be useful,
17 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : * GNU General Public License for more details.
20 : *
21 : * You should have received a copy of the GNU General Public License along
22 : * with this program; if not, write to the Free Software Foundation, Inc.,
23 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 : *
25 : * Authors:
26 : * Alexis Wilke alexis@m2osw.com
27 : */
28 :
29 : /** \file
30 : * \brief The UTF-8 libray is used to convert C++ strings.
31 : *
32 : * This file shows the UTF-8 library version.
33 : *
34 : * The `#define` give you the library version at the time you are compiling.
35 : * The functions allow you to retrieve the version of a dynamically linked
36 : * library.
37 : */
38 :
39 : // self
40 : //
41 : #include "libutf8/version.h"
42 :
43 :
44 : namespace libutf8
45 : {
46 :
47 :
48 :
49 :
50 : /** \brief Get the major version of the library
51 : *
52 : * This function returns the major version of the running library (the
53 : * one you are linked against at runtime).
54 : *
55 : * \return The major version.
56 : */
57 1 : int get_major_version()
58 : {
59 1 : return LIBUTF8_VERSION_MAJOR;
60 : }
61 :
62 :
63 : /** \brief Get the minor version of the library.
64 : *
65 : * This function returns the minor version of the running library
66 : * (the one you are linked against at runtime).
67 : *
68 : * \return The release version.
69 : */
70 1 : int get_release_version()
71 : {
72 1 : return LIBUTF8_VERSION_MINOR;
73 : }
74 :
75 :
76 : /** \brief Get the patch version of the library.
77 : *
78 : * This function returns the patch version of the running library
79 : * (the one you are linked against at runtime).
80 : *
81 : * \return The patch version.
82 : */
83 1 : int get_patch_version()
84 : {
85 1 : return LIBUTF8_VERSION_PATCH;
86 : }
87 :
88 :
89 : /** \brief Get the full version of the library as a string.
90 : *
91 : * This function returns the major, minor, and patch versions of the
92 : * running library (the one you are linked against at runtime) in the
93 : * form of a string.
94 : *
95 : * The build version is not made available. In most cases we change
96 : * the build version only to run a new build, so not code will have
97 : * changed (some documentation and non-code files may changed between
98 : * build versions; but the code will work exactly the same way.)
99 : *
100 : * \return The library version.
101 : */
102 1 : char const * get_version_string()
103 : {
104 1 : return LIBUTF8_VERSION_STRING;
105 : }
106 :
107 :
108 : } // libutf8 namespace
109 : // vim: ts=4 sw=4 et
|