Communi  3.0.0
A cross-platform IRC framework written with Qt
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Macros Groups Pages
ircglobal.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008-2013 The Communi Project
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
13 */
14 
15 #ifndef IRCGLOBAL_H
16 #define IRCGLOBAL_H
17 
18 #include <QtCore/qglobal.h>
19 
25 #if defined(IRC_SHARED)
26 #
27 # if defined(BUILD_IRC_CORE)
28 # define IRC_CORE_EXPORT Q_DECL_EXPORT
29 # else
30 # define IRC_CORE_EXPORT Q_DECL_IMPORT
31 # endif
32 #
33 # if defined(BUILD_IRC_MODEL)
34 # define IRC_MODEL_EXPORT Q_DECL_EXPORT
35 # else
36 # define IRC_MODEL_EXPORT Q_DECL_IMPORT
37 # endif
38 #
39 # if defined(BUILD_IRC_UTIL)
40 # define IRC_UTIL_EXPORT Q_DECL_EXPORT
41 # else
42 # define IRC_UTIL_EXPORT Q_DECL_IMPORT
43 # endif
44 #
45 #elif defined(IRC_STATIC) || defined(BUILD_IRC_CORE) || defined(BUILD_IRC_MODEL) || defined(BUILD_IRC_UTIL)
46 #
47 # define IRC_CORE_EXPORT
48 # define IRC_MODEL_EXPORT
49 # define IRC_UTIL_EXPORT
50 #
51 #else
52 # error Installation problem: either IRC_SHARED or IRC_STATIC must be defined!
53 #endif
54 
71 #define IRC_VERSION 0x030000
72 
81 #define IRC_VERSION_STR "3.0.0"
82 
83 #ifdef IRC_NAMESPACE
84 
85 # define IRC_PREPEND_NAMESPACE(name) ::IRC_NAMESPACE::name
86 # define IRC_USE_NAMESPACE using namespace ::IRC_NAMESPACE;
87 # define IRC_BEGIN_NAMESPACE namespace IRC_NAMESPACE {
88 # define IRC_END_NAMESPACE }
89 # define IRC_FORWARD_DECLARE_CLASS(name) \
90  IRC_BEGIN_NAMESPACE class name; IRC_END_NAMESPACE \
91  using IRC_PREPEND_NAMESPACE(name);
92 
93 #else
94 
95 # define IRC_PREPEND_NAMESPACE(name) ::name
96 # define IRC_USE_NAMESPACE
97 # define IRC_BEGIN_NAMESPACE
98 # define IRC_END_NAMESPACE
99 # define IRC_FORWARD_DECLARE_CLASS(name) class name;
100 
101 #endif // IRC_NAMESPACE
102 
103 #endif // IRCGLOBAL_H