LCOV - code coverage report
Current view: top level - ftmesh - version.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 8 100.0 %
Date: 2022-01-29 21:33:29 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13