LCOV - code coverage report
Current view: top level - advgetopt - version.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 8 100.0 %
Date: 2019-07-15 03:11:49 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * File:
       3             :  *    advgetopt/version.cpp -- advanced get option implementation
       4             :  *
       5             :  * License:
       6             :  *    Copyright (c) 2006-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             :  *    Doug Barbieri  doug@m2osw.com
      28             :  */
      29             : 
      30             : /** \file
      31             :  * \brief Advanced getopt version functions.
      32             :  *
      33             :  * The advgetopt environment is versioned. The functions available here
      34             :  * give you access to the version, in case you wanted to make sure you
      35             :  * had a minimum version or had some special case options when you
      36             :  * want to be able to support various versions.
      37             :  */
      38             : 
      39             : // self
      40             : //
      41             : #include    "advgetopt/version.h"
      42             : 
      43             : 
      44             : // last include
      45             : //
      46             : #include <snapdev/poison.h>
      47             : 
      48             : 
      49             : 
      50             : namespace advgetopt
      51             : {
      52             : 
      53             : 
      54             : 
      55             : 
      56             : /** \brief Get the major version of the library
      57             :  *
      58             :  * This function returns the version of the running library (the
      59             :  * one you are linked against at runtime).
      60             :  *
      61             :  * \return The major version.
      62             :  */
      63           1 : int get_major_version()
      64             : {
      65           1 :     return LIBADVGETOPT_VERSION_MAJOR;
      66             : }
      67             : 
      68             : 
      69             : /** \brief Get the release version of the library.
      70             :  *
      71             :  * This function returns the release version of the running library
      72             :  * (the one you are linked against at runtime).
      73             :  *
      74             :  * \return The release version.
      75             :  */
      76           1 : int get_release_version()
      77             : {
      78           1 :     return LIBADVGETOPT_VERSION_MINOR;
      79             : }
      80             : 
      81             : 
      82             : /** \brief Get the patch version of the library.
      83             :  *
      84             :  * This function returns the patch version of the running library
      85             :  * (the one you are linked against at runtime).
      86             :  *
      87             :  * \return The patch version.
      88             :  */
      89           1 : int get_patch_version()
      90             : {
      91           1 :     return LIBADVGETOPT_VERSION_PATCH;
      92             : }
      93             : 
      94             : 
      95             : /** \brief Get the full version of the library as a string.
      96             :  *
      97             :  * This function returns the major, release, and patch versions of the
      98             :  * running library (the one you are linked against at runtime) in the
      99             :  * form of a string.
     100             :  *
     101             :  * The build version is not made available.
     102             :  *
     103             :  * \return The library version.
     104             :  */
     105           1 : char const * get_version_string()
     106             : {
     107           1 :     return LIBADVGETOPT_VERSION_STRING;
     108             : }
     109             : 
     110             : 
     111             : } // advgetopt namespace
     112             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.12