version.cc

Go to the documentation of this file.
00001 ///
00002 /// \file       version.cc
00003 ///             Provide access to library version information
00004 ///
00005 
00006 /*
00007     Copyright (C) 2007-2012, Net Direct Inc. (http://www.netdirect.ca/)
00008 
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018     See the GNU General Public License in the COPYING file at the
00019     root directory of this project for more details.
00020 */
00021 
00022 #include "version.h"
00023 #include "config.h"
00024 
00025 #ifdef WORDS_BIGENDIAN
00026 #define BARRY_VERSION_STRING    "Barry library version " BARRY_VER_STRING " (big endian)"
00027 #else
00028 #define BARRY_VERSION_STRING    "Barry library version " BARRY_VER_STRING " (little endian)"
00029 #endif
00030 
00031 #define BARRY_VERSION_LOGICAL   BARRY_LOGICAL
00032 #define BARRY_VERSION_MAJOR     BARRY_MAJOR
00033 #define BARRY_VERSION_MINOR     BARRY_MINOR
00034 
00035 namespace Barry {
00036 
00037 /// Fills major and minor with integer version numbers, and
00038 /// returns a string containing human readable version
00039 /// information in English.
00040 const char* Version(int &logical, int &major, int &minor)
00041 {
00042         major = BARRY_VERSION_MAJOR;
00043         minor = BARRY_VERSION_MINOR;
00044         return BARRY_VERSION_STRING;
00045 }
00046 
00047 } // namespace Barry
00048