radarlib 1.4.6
lib.hpp
Go to the documentation of this file.
1/*
2 * Radar Library
3 *
4 * Copyright (C) 2009-2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Author: Guido Billi <guidobilli@gmail.com>
21 */
22
27#ifndef __RADARLIB_LIB_H__
28#define __RADARLIB_LIB_H__
29
30#include <radarlib/defs.h>
31
32/*===========================================================================*/
33/* CURRENT VERSION */
34/*===========================================================================*/
35
36/* current library version values */
37#define RADARLIB_MAJOR 1
38#define RADARLIB_MINOR 4
39#define RADARLIB_BUILD 0
40
41/* macro to convert values into a single integer value */
42#define RADARLIB_MAKEVERSION(a,b,c) ((a)*10000 + (b)*100 + (c))
43
44/* currrent library version value */
45#define RADARLIB_CURRENT_VERSION RADARLIB_MAKEVERSION(RADARLIB_MAJOR,RADARLIB_MINOR,RADARLIB_BUILD)
46
47/*===========================================================================*/
48/* RADARLIB CLASS */
49/*===========================================================================*/
50
51namespace Radar {
52
59class RADAR_API RadarLibrary
60{
61public:
69 static int getVersion(void);
70
76 static void checkVersion()
77 {
78 checkVersion(RADARLIB_CURRENT_VERSION);
79 }
80
81private:
82 static void checkVersion(int clientVersion);
83 static void throwVersionError(int clientVersion);
84};
85
86}
87
88/*===========================================================================*/
89/* C BINDING */
90/*===========================================================================*/
91
92#ifdef __cplusplus
93extern "C" {
94#endif
95
103RADAR_API int radarlib_get_version(void);
104
105#ifdef __cplusplus
106}
107#endif
108
109/*===========================================================================*/
110
111
112#endif
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Library Class.
Definition lib.hpp:60
static void checkVersion()
Check the library version.
Definition lib.hpp:76
Internal library macros.
RADAR_API int radarlib_get_version(void)
Get Library Version.
Definition lib.cpp:71