LifeV
LifeVersion.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 /*!
27  @file
28  @brief The file was created from KDE/kdelibs/kdecore/kdeversion.hpp and
29  accomodated to LifeV needs.
30 
31  @date 2005-02-19
32  @author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
33  @mantainer Simone Deparis <simone.deparis@epfl.ch>
34 
35  */
36 
37 #ifndef _LIFEV_VERSION_H_
38 #define _LIFEV_VERSION_H_
39 
40 //#include <lifev/core/LifeV.hpp>
41 
42 #define LIFEV_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
43 
44 #if !defined(LIFEV_VERSION_MAJOR)
45 #define LIFEV_VERSION_MAJOR 4
46 #endif
47 
48 #if !defined(LIFEV_VERSION_MINOR)
49 #define LIFEV_VERSION_MINOR 0
50 #endif
51 
52 #if !defined(LIFEV_VERSION_MICRO)
53 #define LIFEV_VERSION_MICRO 3
54 #endif
55 
56 #if !defined(LIFEV_VERSION)
57 #define LIFEV_VERSION
59 #endif
60 
61 #define LIFEV_IS_VERSION(a,b,c) ( LIFEV_VERSION >= LIFEV_MAKE_VERSION(a,b,c) )
62 
63 /**
64  * Namespace for general LIFEV functions.
65  */
66 namespace LifeV
67 {
68 /**
69  * Returns the encoded number of LIFEV's version, see the LIFEV_VERSION macro.
70  * In contrary to that macro this function returns the number of the actually
71  * installed LIFEV version, not the number of the LIFEV version that was
72  * installed when the program was compiled.
73  * @return the version number, encoded in a single uint
74  * @since 0.7
75  */
76 unsigned int version();
77 
78 /**
79  * Returns the major number of LIFEV's version, e.g.
80  * 0 for LIFEV 0.7
81  * @return the major version number
82  * @since 0.7
83  */
84 unsigned int versionMajor();
85 
86 /**
87  * Returns the minor number of LIFEV's version, e.g.
88  * 7 for LIFEV 0.7.0
89  * @return the minor version number
90  * @since 0.7
91  */
92 unsigned int versionMinor();
93 
94 /**
95  * Returns the micro number of LIFEV's version, e.g.
96  * 0 for LIFEV 0.7.0
97  * @return the extra information
98  * @since 0.7
99  */
100 unsigned int versionMicro();
101 
102 /**
103  * Returns the LIFEV version as string, e.g. "0.7.0".
104  * @return the LIFEV version. You can keep the string forever
105  * @since 0.7
106  */
107 char const* versionString();
108 }
109 
110 #endif // _LIFEV_VERSION_H_
#define LIFEV_VERSION_MICRO
Definition: LifeVersion.hpp:53
void updateInverseJacobian(const UInt &iQuadPt)
#define LIFEV_VERSION_MAJOR
Definition: LifeVersion.hpp:45
#define LIFEV_VERSION_MINOR
Definition: LifeVersion.hpp:49
char const * versionString()
Returns the LIFEV version as string, e.g.
Definition: LifeVersion.cpp:62
unsigned int version()
Returns the encoded number of LIFEV&#39;s version, see the LIFEV_VERSION macro.
Definition: LifeVersion.cpp:42
unsigned int versionMicro()
Returns the micro number of LIFEV&#39;s version, e.g.
Definition: LifeVersion.cpp:57
#define LIFEV_MAKE_VERSION(a, b, c)
Definition: LifeVersion.hpp:42
unsigned int versionMajor()
Returns the major number of LIFEV&#39;s version, e.g.
Definition: LifeVersion.cpp:47
unsigned int versionMinor()
Returns the minor number of LIFEV&#39;s version, e.g.
Definition: LifeVersion.cpp:52
#define LIFEV_VERSION
Definition: LifeVersion.hpp:57