2 * Copyright 2003, The libsigc++ Development Team
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef SIGCXX_SIGCXX_H
21 #define SIGCXX_SIGCXX_H
23 /** @mainpage libsigc++ Reference Manual
25 * @section description Description
27 * libsigc++ provides a typesafe (at compile time) callback system for standard
28 * C++. It allows you to define signals and to connect those signals to any
29 * callback function, either a global or a member function, regardless of whether
30 * it is static or virtual. It also contains adaptor classes for connection of
31 * dissimilar callbacks.
33 * For instance, see the @ref signal "Signals", @ref sigcfunctors "Functors",
34 * @ref slot "Slots" and @ref adaptors "Adaptors".
37 * <a href="http://libsigc.sourceforge.net/libsigc2/docs/manual/html/index.html">libsigc++ tutorial</a>,
38 * the <a href="http://libsigc.sourceforge.net/">libsigc++ website</a>, and
39 * the <a href="http://library.gnome.org/devel/gtkmm-tutorial/unstable/chapter-signals.html">Signals appendix of the Programming with gtkmm book</a>.
41 * @section features Features
43 * - Compile-time typesafe callbacks (also faster than run time checks)
44 * - Type-safety violations report the line number correctly with template names
45 * (no tracing template failures into headers)
46 * - No compiler extensions or meta compilers required
47 * - Proper handling of dynamic objects and signals (deleted objects will not
49 * - Extendable API at any level: signal, slot, connection and trackable
50 * - Extensions do not require alteration of basic components
51 * - User-definable accumulators
52 * - A variety of adaptors to change the callback signature: bind, hide,
55 * @section basics Basic Usage
57 * Include the libsigc++ header:
59 * #include <sigc++/sigc++.h>
61 * (You may include individual headers, such as @c sigc++/bind.h instead.)
63 * If your source file is @c program.cc, you can compile it with:
65 * g++ program.cc -o program `pkg-config --cflags --libs sigc++-3.0`
68 * @subsection autotools Using Autotools
70 * Alternatively, if using autoconf, use the following in @c configure.ac:
72 * PKG_CHECK_MODULES([DEPS], [sigc++-3.0])
74 * Then use the generated @c DEPS_CFLAGS and @c DEPS_LIBS variables
75 * in the project @c Makefile.am files. For example:
77 * yourprogram_CPPFLAGS = $(DEPS_CFLAGS)
78 * yourprogram_LDADD = $(DEPS_LIBS)
81 * Your @c PKG_CHECK_MODULES() call should also mention any other libraries that
82 * you need to use via pkg-config.
84 * @subsection cmake Using CMake
86 * If using CMake, use the following in @c CMakeList.txt:
88 * include(FindPkgConfig)
89 * pkg_check_modules(DEPS REQUIRED sigc++-3.0)
90 * include_directories(${DEPS_INCLUDE_DIRS})
91 * target_link_libraries(yourprogram ${DEPS_LIBRARIES})
94 * Your @c pkg_check_modules() call should also mention any other libraries that
95 * you need to use via pkg-config.
97 * @section scope Scope of Documentation
99 * libsigc++ contains many template functions and template classes/structs,
100 * some with many specializations. This reference manual does not show all
101 * specializations of those templates that hardly any user will use directly.
104 #include <sigc++/signal.h>
105 #include <sigc++/connection.h>
106 #include <sigc++/trackable.h>
107 #include <sigc++/adaptors/adaptors.h>
108 #include <sigc++/functors/functors.h>
110 #endif /* SIGCXX_SIGCXX_H */