Ananas Library 0.9.5
ananasglobal.h
1/****************************************************************************
2** $Id: ananasglobal.h,v 1.5 2007/12/30 14:18:28 app Exp $
3**
4** Header file of the Ananas Library of Ananas
5** Designer and Engine applications
6**
7** Created : 20040901
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10** Copyright (C) 2003-2004 Linux Center (Orenburg). All rights reserved.
11**
12** This file is part of the Library of the Ananas
13** automation accounting system.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22**
23** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25**
26** Contact org@leaderit.ru if any conditions of this licensing are
27** not clear to you.
28**
29**********************************************************************/
30
31#ifndef ANANASGLOBAL_H
32#define ANANASGLOBAL_H
33
34#include <qglobal.h>
35
36#define ANANAS_DEBUG
37
38#define ANANAS_VERSION_STRING "0.9.5"
39#define ANANAS_VERSION_MAJOR 0
40#define ANANAS_VERSION_MINOR 9
41#define ANANAS_VERSION_MICRO 5
42
43// helper macros
44#define ANANAS_MAKE_VERSION(maj, min, mic) (((maj) << 16) | ((min) << 8) | (mic))
45#define ANANAS_VERSION \
46 ANANAS_MAKE_VERSION(ANANAS_VERSION_MAJOR, ANANAS_VERSION_MINOR, ANANAS_VERSION_MICRO)
47
48// evaluate to true if this version is (maj, min, mic) at minimum
49#define ANANAS_IS_VERSION(maj, min, mic) \
50 (ANANAS_VERSION >= ANANAS_MAKE_VERSION(maj, min, mic))
51
52#if defined(Q_OS_WIN32) && !defined(ANANAS_NO_DLL)
53# if defined(ANANAS_DLL)
54# define ANANAS_EXPORT __declspec(dllexport)
55# else
56# define ANANAS_EXPORT __declspec(dllimport)
57# endif
58#else
59# define ANANAS_EXPORT
60#endif
61
62#ifdef _MSC_VER
63#define LLU_SPEC "%I64u"
64#else
65#define LLU_SPEC "%llu"
66#endif
67
68#if defined (ANANAS_DLL)
69# define ANANAS_TEMPLATE_EXTERN
70#elif defined (Q_TEMPLATEDLL)
71# define ANANAS_TEMPLATE_EXTERN Q_TEMPLATE_EXTERN
72#else
73# define ANANAS_TEMPLATE_EXTERN
74#endif
75
76
77//#if defined(Q_ULLONG)
78# define ANANAS_UID Q_ULLONG
79# define ANANAS_UID_VALUE( v ) v.toULongLong()
80//#error yes
81//#else
82//# define ANANAS_UID unsigned int
83//# define ANANAS_UID_VALUE( v ) v.toUInt()
84//#error no
85//#endif
86
87#endif