]> granicus.if.org Git - icinga2/blob - lib/base/i2-base.hpp
Update copyright headers for 2016
[icinga2] / lib / base / i2-base.hpp
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)  *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 #ifndef I2BASE_H
21 #define I2BASE_H
22
23 /**
24  * @mainpage Icinga Documentation
25  *
26  * Icinga implements a framework for run-time-loadable components which can
27  * pass messages between each other. These components can either be hosted in
28  * the same process or in several host processes (either on the same machine or
29  * on different machines).
30  *
31  * The framework's code critically depends on the following patterns:
32  *
33  * <list type="bullet">
34  * <item>Smart pointers
35  *
36  * The shared_ptr and weak_ptr template classes are used to simplify memory
37  * management and to avoid accidental memory leaks and use-after-free
38  * bugs.</item>
39  *
40  * <item>Observer pattern
41  *
42  * Framework classes expose events which other objects can subscribe to. This
43  * is used to decouple clients of a class from the class' internal
44  * implementation.</item>
45  * </list>
46  */
47
48 /**
49  * @defgroup base Base class library
50  *
51  * The base class library implements commonly-used functionality like
52  * event handling for sockets and timers.
53  */
54
55 #ifdef _MSC_VER
56 #       pragma warning(disable:4251)
57 #       pragma warning(disable:4275)
58 #       pragma warning(disable:4345)
59 #endif /* _MSC_VER */
60
61 #include "config.h"
62
63 #ifdef _WIN32
64 #       include "base/win32.hpp"
65 #else
66 #       include "base/unix.hpp"
67 #endif
68
69 #include <cstdlib>
70 #include <cstdarg>
71 #include <cstdio>
72 #include <cstring>
73 #include <cerrno>
74
75 #include <sys/types.h>
76 #include <sys/stat.h>
77 #include <signal.h>
78
79 #include <exception>
80 #include <stdexcept>
81
82 #if defined(__APPLE__) && defined(__MACH__)
83 #       pragma GCC diagnostic ignored "-Wdeprecated-declarations"
84 #endif
85
86 #include "base/visibility.hpp"
87
88 #ifdef I2_BASE_BUILD
89 #       define I2_BASE_API I2_EXPORT
90 #else /* I2_BASE_BUILD */
91 #       define I2_BASE_API I2_IMPORT
92 #endif /* I2_BASE_BUILD */
93
94 #endif /* I2BASE_H */