t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Macros | Functions
t8_version.h File Reference

This file offers additional functions and support regarding the t8code version. More...

#include <t8.h>
#include <t8_config.h>

Go to the source code of this file.

Macros

#define T8_STRINGIFY(arg)   #arg
 
#define T8_STRINGIFY_MIDDLE(arg)   T8_STRINGIFY(arg)
 
#define T8_VERSION_POINT_STRING   T8_STRINGIFY_MIDDLE(T8_VERSION_POINT)
 The T8_VERSION_POINT macro as a string.
 

Functions

const char * t8_get_package_string ()
 Return the package string of t8code. More...
 
const char * t8_get_version_number ()
 Return the version number of t8code as a string. More...
 
const char * t8_get_version_point_string ()
 Return the version point string. More...
 
int t8_get_version_major ()
 Return the major version number of t8code. More...
 
int t8_get_version_minor ()
 Return the minor version number of t8code. More...
 
int t8_get_version_patch ()
 Return the patch version number of t8code. More...
 

Detailed Description

This file offers additional functions and support regarding the t8code version.

The version number of t8code is a string "X.Y.Z-HASH" where the "-HASH" part is optional. Additional macros are defined in t8_config.h and the functions in this header provide an interface to these macros.

Macro Meaning example
T8_PACKAGE_STRING The package string of t8code "t8 0.41.1-288be-dirty"
T8_PACKAGE_VERSION The full version number X.Y.Z-HASH as string "0.41.1-288be-dirty"
T8_VERSION_MAJOR The major version number of t8code X as int 0
T8_VERSION_MINOR The minor version number of t8code Y as int 42
T8_VERSION_POINT The point version number of t8code Z-HASH as inst 1-288be-dirty
T8_VERSION_POINT_STRING The point version number of t8code Z-HASH as string "1-288be-dirty"

Attention: By design of git's version handling, T8_VERSION_POINT is not defined as a string. Since it does often contain chars we additionally define the macro T8_VERSION_POINT_STRING in this header file.

The point version number consists of the the patch version number and the HASH part. To get the patch version number Z alone use t8_get_version_patch.

Function Documentation

◆ t8_get_package_string()

const char* t8_get_package_string ( )

Return the package string of t8code.

This string has the format "t8 version_number".

Returns
The version string of t8code.

◆ t8_get_version_major()

int t8_get_version_major ( )

Return the major version number of t8code.

Returns
The major version number of t8code.

◆ t8_get_version_minor()

int t8_get_version_minor ( )

Return the minor version number of t8code.

Returns
The minor version number of t8code.

◆ t8_get_version_number()

const char* t8_get_version_number ( )

Return the version number of t8code as a string.

Returns
The version number of t8code as a string.

◆ t8_get_version_patch()

int t8_get_version_patch ( )

Return the patch version number of t8code.

Returns
The patch version unmber of t8code. negative on error.
Note
In contrast to t8_get_version_major and t8_get_version_minor the patch version number must be computed from T8_VERSION_POINT This computation may result in an error or an invalid patch number. In that case a negative patch version is returned.

◆ t8_get_version_point_string()

const char* t8_get_version_point_string ( )

Return the version point string.

Returns
The version point point string.