/*1This file is part of t8code.2t8code is a C library to manage a collection (a forest) of multiple3connected adaptive space-trees of general element classes in parallel.45Copyright (C) 2015 the developers67t8code is free software; you can redistribute it and/or modify8it under the terms of the GNU General Public License as published by9the Free Software Foundation; either version 2 of the License, or10(at your option) any later version.1112t8code is distributed in the hope that it will be useful,13but WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15GNU General Public License for more details.1617You should have received a copy of the GNU General Public License18along with t8code; if not, write to the Free Software Foundation, Inc.,1951 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.20*/2122/** \file t8_version.h23* This file offers additional functions and support regarding the t8code version.24* The version number of t8code is a string "X.Y.Z-HASH" where the "-HASH" part is optional.25*26* Macro | Meaning | example27* ------- | ------- | ------28* T8_PACKAGE_STRING | The package string of t8code | "t8 0.41.1-288be-dirty"29* T8_PACKAGE_VERSION | The full version number X.Y.Z-HASH as string | "0.41.1-288be-dirty"30* T8_VERSION_MAJOR | The major version number of t8code X as int | 031* T8_VERSION_MINOR | The minor version number of t8code Y as int | 4232* T8_VERSION_POINT | The point version number of t8code Z-HASH as inst | 1-288be-dirty33* \ref T8_VERSION_POINT_STRING | The point version number of t8code Z-HASH as string | "1-288be-dirty"34*35* Attention: By design of git's version handling, T8_VERSION_POINT is not defined as a string.36* Since it does often contain chars we additionally define the macro \ref T8_VERSION_POINT_STRING37* in this header file.38*39* The point version number consists of the the patch version number and the HASH part.40* To get the patch version number Z alone use \ref t8_get_version_patch.41*/4243#ifndef T8_VERSION_H44#define T8_VERSION_H4546#include <t8.h>4748/** In order to convert a macro to a string, we49* need to pass it through these two helper macros. */50#define T8_STRINGIFY(arg) #arg51/** In order to convert a macro to a string, we52* need to pass it through these two helper macros. */53#define T8_STRINGIFY_MIDDLE(arg) T8_STRINGIFY (arg)5455/** The T8_VERSION_POINT macro as a string */56#define T8_VERSION_POINT_STRING T8_STRINGIFY_MIDDLE (T8_VERSION_POINT)5758/** Call this after including all headers */59T8_EXTERN_C_BEGIN ();6061/** Return the package string of t8code.62* This string has the format "t8 version_number".63* \return The version string of t8code.64*/65const char*66t8_get_package_string ();6768/** Return the version number of t8code as a string.69* \return The version number of t8code as a string.70*/71const char*72t8_get_version_number ();7374/** Return the version point string.75* \return The version point point string.76*/77const char*78t8_get_version_point_string ();7980/** Return the major version number of t8code.81* \return The major version number of t8code.82*/83int84t8_get_version_major ();8586/** Return the minor version number of t8code.87* \return The minor version number of t8code.88*/89int90t8_get_version_minor ();9192/** Return the patch version number of t8code.93* \return The patch version number of t8code.94*/95int96t8_get_version_patch ();9798/** Call this at the end of a header file to match T8_EXTERN_C_BEGIN (). */99T8_EXTERN_C_END ();100101#endif /* !T8_VERSION_H */102103104