From 07f2210880c4725f4c2ba5ebddbeadbd60a4e491 Mon Sep 17 00:00:00 2001 From: Doug McLain Date: Thu, 22 May 2008 22:47:52 +0000 Subject: [PATCH] Add sigc 2.2.2 git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3400 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/sigc++2/AUTHORS | 8 + libs/sigc++2/COPYING | 515 ++ libs/sigc++2/ChangeLog | 1968 +++++ libs/sigc++2/INSTALL | 229 + libs/sigc++2/Makefile.am | 18 + libs/sigc++2/Makefile.in | 711 ++ libs/sigc++2/NEWS | 354 + libs/sigc++2/README | 72 + libs/sigc++2/SConscript | 41 + libs/sigc++2/TODO | 66 + libs/sigc++2/aclocal.m4 | 7304 +++++++++++++++++ libs/sigc++2/autogen.sh | 114 + libs/sigc++2/config.guess | 1471 ++++ libs/sigc++2/config.sub | 1599 ++++ libs/sigc++2/configure.ac | 126 + libs/sigc++2/depcomp | 584 ++ libs/sigc++2/install-sh | 507 ++ libs/sigc++2/libsigc++-2.0.spec.in | 91 + libs/sigc++2/ltmain.sh | 6863 ++++++++++++++++ libs/sigc++2/missing | 367 + libs/sigc++2/scripts/Makefile.am | 1 + libs/sigc++2/scripts/Makefile.in | 332 + libs/sigc++2/scripts/cxx.m4 | 122 + libs/sigc++2/scripts/cxx_std.m4 | 77 + libs/sigc++2/sigc++-2.0.pc.in | 10 + libs/sigc++2/sigc++/Makefile.am | 105 + libs/sigc++2/sigc++/Makefile.in | 641 ++ libs/sigc++2/sigc++/adaptors/adaptor_trait.h | 365 + libs/sigc++2/sigc++/adaptors/adaptors.h | 32 + libs/sigc++2/sigc++/adaptors/bind.h | 2265 +++++ libs/sigc++2/sigc++/adaptors/bind_return.h | 206 + libs/sigc++2/sigc++/adaptors/bound_argument.h | 165 + libs/sigc++2/sigc++/adaptors/compose.h | 314 + .../sigc++/adaptors/deduce_result_type.h | 121 + .../sigc++2/sigc++/adaptors/exception_catch.h | 318 + libs/sigc++2/sigc++/adaptors/hide.h | 1064 +++ libs/sigc++2/sigc++/adaptors/lambda/base.h | 415 + libs/sigc++2/sigc++/adaptors/lambda/group.h | 737 ++ libs/sigc++2/sigc++/adaptors/lambda/lambda.cc | 15 + libs/sigc++2/sigc++/adaptors/lambda/lambda.h | 28 + .../sigc++/adaptors/lambda/macros/base.h.m4 | 317 + .../sigc++/adaptors/lambda/macros/group.h.m4 | 176 + .../adaptors/lambda/macros/lambda.cc.m4 | 26 + .../adaptors/lambda/macros/operator.h.m4 | 523 ++ .../sigc++/adaptors/lambda/macros/select.h.m4 | 64 + .../sigc++2/sigc++/adaptors/lambda/operator.h | 1700 ++++ libs/sigc++2/sigc++/adaptors/lambda/select.h | 346 + .../sigc++/adaptors/macros/adaptor_trait.h.m4 | 288 + libs/sigc++2/sigc++/adaptors/macros/bind.h.m4 | 377 + .../sigc++/adaptors/macros/bind_return.h.m4 | 120 + .../sigc++/adaptors/macros/compose.h.m4 | 248 + .../adaptors/macros/deduce_result_type.h.m4 | 100 + .../adaptors/macros/exception_catch.h.m4 | 171 + libs/sigc++2/sigc++/adaptors/macros/hide.h.m4 | 231 + .../sigc++/adaptors/macros/retype.h.m4 | 204 + .../sigc++/adaptors/macros/retype_return.h.m4 | 165 + libs/sigc++2/sigc++/adaptors/retype.h | 1248 +++ libs/sigc++2/sigc++/adaptors/retype_return.h | 309 + libs/sigc++2/sigc++/bind.h | 24 + libs/sigc++2/sigc++/bind_return.h | 25 + libs/sigc++2/sigc++/class_slot.h | 11 + libs/sigc++2/sigc++/connection.cc | 111 + libs/sigc++2/sigc++/connection.h | 129 + libs/sigc++2/sigc++/functors/functor_trait.h | 307 + libs/sigc++2/sigc++/functors/functors.h | 27 + .../sigc++/functors/macros/functor_trait.h.m4 | 172 + .../sigc++/functors/macros/mem_fun.h.m4 | 272 + .../sigc++/functors/macros/ptr_fun.h.m4 | 126 + libs/sigc++2/sigc++/functors/macros/slot.h.m4 | 289 + libs/sigc++2/sigc++/functors/mem_fun.h | 6201 ++++++++++++++ libs/sigc++2/sigc++/functors/ptr_fun.h | 542 ++ libs/sigc++2/sigc++/functors/slot.cc | 25 + libs/sigc++2/sigc++/functors/slot.h | 1301 +++ libs/sigc++2/sigc++/functors/slot_base.cc | 179 + libs/sigc++2/sigc++/functors/slot_base.h | 321 + libs/sigc++2/sigc++/hide.h | 6 + libs/sigc++2/sigc++/limit_reference.h | 455 + libs/sigc++2/sigc++/macros/class_slot.h.m4 | 27 + libs/sigc++2/sigc++/macros/hide.h.m4 | 23 + .../sigc++/macros/limit_reference.h.m4 | 158 + libs/sigc++2/sigc++/macros/method_slot.h.m4 | 23 + libs/sigc++2/sigc++/macros/object_slot.h.m4 | 22 + libs/sigc++2/sigc++/macros/retype.h.m4 | 75 + libs/sigc++2/sigc++/macros/signal.h.m4 | 1100 +++ libs/sigc++2/sigc++/macros/slot.h.m4 | 25 + libs/sigc++2/sigc++/macros/template.macros.m4 | 84 + libs/sigc++2/sigc++/method_slot.h | 7 + libs/sigc++2/sigc++/object.h | 24 + libs/sigc++2/sigc++/object_slot.h | 4 + libs/sigc++2/sigc++/reference_wrapper.h | 110 + libs/sigc++2/sigc++/retype.h | 8 + libs/sigc++2/sigc++/retype_return.h | 25 + libs/sigc++2/sigc++/sigc++.h | 30 + libs/sigc++2/sigc++/signal.cc | 25 + libs/sigc++2/sigc++/signal.h | 3823 +++++++++ libs/sigc++2/sigc++/signal_base.cc | 152 + libs/sigc++2/sigc++/signal_base.h | 300 + libs/sigc++2/sigc++/slot.h | 9 + libs/sigc++2/sigc++/trackable.cc | 127 + libs/sigc++2/sigc++/trackable.h | 148 + libs/sigc++2/sigc++/type_traits.h | 147 + libs/sigc++2/sigc++/visit_each.h | 174 + libs/sigc++2/sigc++config.h.in | 80 + 103 files changed, 54207 insertions(+) create mode 100644 libs/sigc++2/AUTHORS create mode 100644 libs/sigc++2/COPYING create mode 100644 libs/sigc++2/ChangeLog create mode 100644 libs/sigc++2/INSTALL create mode 100644 libs/sigc++2/Makefile.am create mode 100644 libs/sigc++2/Makefile.in create mode 100644 libs/sigc++2/NEWS create mode 100644 libs/sigc++2/README create mode 100644 libs/sigc++2/SConscript create mode 100644 libs/sigc++2/TODO create mode 100644 libs/sigc++2/aclocal.m4 create mode 100755 libs/sigc++2/autogen.sh create mode 100755 libs/sigc++2/config.guess create mode 100755 libs/sigc++2/config.sub create mode 100644 libs/sigc++2/configure.ac create mode 100755 libs/sigc++2/depcomp create mode 100755 libs/sigc++2/install-sh create mode 100644 libs/sigc++2/libsigc++-2.0.spec.in create mode 100644 libs/sigc++2/ltmain.sh create mode 100755 libs/sigc++2/missing create mode 100644 libs/sigc++2/scripts/Makefile.am create mode 100644 libs/sigc++2/scripts/Makefile.in create mode 100644 libs/sigc++2/scripts/cxx.m4 create mode 100644 libs/sigc++2/scripts/cxx_std.m4 create mode 100644 libs/sigc++2/sigc++-2.0.pc.in create mode 100644 libs/sigc++2/sigc++/Makefile.am create mode 100644 libs/sigc++2/sigc++/Makefile.in create mode 100644 libs/sigc++2/sigc++/adaptors/adaptor_trait.h create mode 100644 libs/sigc++2/sigc++/adaptors/adaptors.h create mode 100644 libs/sigc++2/sigc++/adaptors/bind.h create mode 100644 libs/sigc++2/sigc++/adaptors/bind_return.h create mode 100644 libs/sigc++2/sigc++/adaptors/bound_argument.h create mode 100644 libs/sigc++2/sigc++/adaptors/compose.h create mode 100644 libs/sigc++2/sigc++/adaptors/deduce_result_type.h create mode 100644 libs/sigc++2/sigc++/adaptors/exception_catch.h create mode 100644 libs/sigc++2/sigc++/adaptors/hide.h create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/base.h create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/group.h create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/lambda.cc create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/lambda.h create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/macros/base.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/macros/group.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/macros/lambda.cc.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/macros/operator.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/macros/select.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/operator.h create mode 100644 libs/sigc++2/sigc++/adaptors/lambda/select.h create mode 100644 libs/sigc++2/sigc++/adaptors/macros/adaptor_trait.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/bind.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/bind_return.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/compose.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/deduce_result_type.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/exception_catch.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/hide.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/retype.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/macros/retype_return.h.m4 create mode 100644 libs/sigc++2/sigc++/adaptors/retype.h create mode 100644 libs/sigc++2/sigc++/adaptors/retype_return.h create mode 100644 libs/sigc++2/sigc++/bind.h create mode 100644 libs/sigc++2/sigc++/bind_return.h create mode 100644 libs/sigc++2/sigc++/class_slot.h create mode 100644 libs/sigc++2/sigc++/connection.cc create mode 100644 libs/sigc++2/sigc++/connection.h create mode 100644 libs/sigc++2/sigc++/functors/functor_trait.h create mode 100644 libs/sigc++2/sigc++/functors/functors.h create mode 100644 libs/sigc++2/sigc++/functors/macros/functor_trait.h.m4 create mode 100644 libs/sigc++2/sigc++/functors/macros/mem_fun.h.m4 create mode 100644 libs/sigc++2/sigc++/functors/macros/ptr_fun.h.m4 create mode 100644 libs/sigc++2/sigc++/functors/macros/slot.h.m4 create mode 100644 libs/sigc++2/sigc++/functors/mem_fun.h create mode 100644 libs/sigc++2/sigc++/functors/ptr_fun.h create mode 100644 libs/sigc++2/sigc++/functors/slot.cc create mode 100644 libs/sigc++2/sigc++/functors/slot.h create mode 100644 libs/sigc++2/sigc++/functors/slot_base.cc create mode 100644 libs/sigc++2/sigc++/functors/slot_base.h create mode 100644 libs/sigc++2/sigc++/hide.h create mode 100644 libs/sigc++2/sigc++/limit_reference.h create mode 100644 libs/sigc++2/sigc++/macros/class_slot.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/hide.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/limit_reference.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/method_slot.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/object_slot.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/retype.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/signal.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/slot.h.m4 create mode 100644 libs/sigc++2/sigc++/macros/template.macros.m4 create mode 100644 libs/sigc++2/sigc++/method_slot.h create mode 100644 libs/sigc++2/sigc++/object.h create mode 100644 libs/sigc++2/sigc++/object_slot.h create mode 100644 libs/sigc++2/sigc++/reference_wrapper.h create mode 100644 libs/sigc++2/sigc++/retype.h create mode 100644 libs/sigc++2/sigc++/retype_return.h create mode 100644 libs/sigc++2/sigc++/sigc++.h create mode 100644 libs/sigc++2/sigc++/signal.cc create mode 100644 libs/sigc++2/sigc++/signal.h create mode 100644 libs/sigc++2/sigc++/signal_base.cc create mode 100644 libs/sigc++2/sigc++/signal_base.h create mode 100644 libs/sigc++2/sigc++/slot.h create mode 100644 libs/sigc++2/sigc++/trackable.cc create mode 100644 libs/sigc++2/sigc++/trackable.h create mode 100644 libs/sigc++2/sigc++/type_traits.h create mode 100644 libs/sigc++2/sigc++/visit_each.h create mode 100644 libs/sigc++2/sigc++config.h.in diff --git a/libs/sigc++2/AUTHORS b/libs/sigc++2/AUTHORS new file mode 100644 index 0000000000..000671ac0a --- /dev/null +++ b/libs/sigc++2/AUTHORS @@ -0,0 +1,8 @@ +Martin Schulze +Murray Cumming +Cedric Gustin (win32 support) +Timothy M. Shead and James Lin (MSVC support) +Damien Carbery (Sun FORTE C++ support) +Takashi Takekawa (Intel C++ support) +Andreas Rottmann (make system) +Karl Einar Nelson (initial version 1.9.4) diff --git a/libs/sigc++2/COPYING b/libs/sigc++2/COPYING new file mode 100644 index 0000000000..c4792dd27a --- /dev/null +++ b/libs/sigc++2/COPYING @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/libs/sigc++2/ChangeLog b/libs/sigc++2/ChangeLog new file mode 100644 index 0000000000..1e7ffd7fa0 --- /dev/null +++ b/libs/sigc++2/ChangeLog @@ -0,0 +1,1968 @@ +2.2.2: + +2008-03-10 Deng Xiyue + + * sigc++/macros/signal.h.m4: + * tests/test_accum_iter.cc: Add ifdefs around uses of + reverse_iterator to really fix the build with recent + versions of Sun CC. + Bug #302098. + +2.2.0: + +2008-01-01 Ryan Hill + + * tests/test_copy_invalid_slot.cc: Include the cstdlib + and cstring headers to fix the build with the gcc 4.3 + pre-release. Bug #454882. + +2007-08-31 Murray Cumming + + * tests/test_copy_invalid_slot.cc: Added some includes to + fix the build in some environments, such as when using Sun CC. + Thanks to Vladimir Marek in bug #469872. + +2.1.1: + +2007-08-14 Murray Cumming + + * sigc++/Makefile.am: + * sigc++/compatibility.h: Removed this header. + * sigc++/bind.h: + * sigc++/bind_return.h: + * sigc++/connection.h: + * sigc++/macros/class_slot.h.m4: + * sigc++/macros/hide.h.m4: + * sigc++/macros/method_slot.h.m4: + * sigc++/macros/object_slot.h.m4: + * sigc++/macros/retype.h.m4: + * sigc++/macros/signal.h.m4: + * sigc++/macros/slot.h.m4: + * sigc++/object.h: + * sigc++/retype_return.h: Removed deprecated + compatibility API, to probably fix the build with + some compilers, such as some versions of the Sun Forte C++ + CC compiler. Some of these headers are now mostly empty and + should be removed later. + This API has been deprecated April 2004, and + is not widely used, so it seems safe to do this now. + + * tests/Makefile.am: + * tests/test_compatibility.cc: Removed this test. + +2007-07-28 Michael Elkstrand + + * sigc++/macros/signal.h.m4: slot_iterator_buf, + slot_reverse_iterator_buf: Added typedefs for + value_type, reference, and pointer, so that these + iterators are more like standard C++ iterators, so they can + be used with standard C++ algorithms. + * tests/Makefile.am: + * tests/test_accum_iter.cc: Added a test for this. + Bug #417926. + +2006-11-14 Daniel Elstner + + * autogen.sh: Wholly replace this script with a critter from one + of my personal projects, with slight modifications. This one does + some sophisticated stuff like probing version numbers of available + automake and aclocal executables, in order to choose the right one + accordingly. All this is necessary to make the build system work + robustly in custom environments such as Maemo where automake-1.9 + doesn't come preinstalled. + +2006-06-20 Murray Cumming + + * sigc++/adaptors/macros/bind.h.m4: + * sigc++/adaptors/macros/retype.h.m4: + * sigc++/functors/macros/functor_trait.h.m4: + * sigc++/functors/macros/slot.h.m4: + * sigc++/macros/retype.h.m4: + * sigc++/macros/signal.h.m4: Revert the previous changes, because none is + used in the exported symbol names from gtkmm, so this would break the ABI + of gtkmm. + +2006-05-26 Régis Duchesne + + * sigc++/adaptors/macros/bind.h.m4: + * sigc++/adaptors/macros/retype.h.m4: + * sigc++/functors/macros/functor_trait.h.m4: + * sigc++/functors/macros/slot.h.m4: + * sigc++/macros/retype.h.m4: + * sigc++/macros/signal.h.m4: + Renamed 'nil' to 'none' to allow an Objective-C++ compiler to compile + the library header files. + +2005-12-21 Murray Cumming + + * sigc++/macros/signal.h.m4: Make remaining + reverse_iterator_buf operator--() methods + return by reference, like the operator++() methods. + Bug #304402 from John Profic. + +2005-12-20 Murray Cumming + + * sigc++/macros/signal.h.m4: Make all operator--() methods + return by reference, like the operator++() methods. + Bug #304402 from John Profic. + +2005-12-14 John Profic + + * sigc++/macros/signal.h.m4: Fix compilation problem in + the last patch. + +2005-12-14 John Profic + + * sigc++/macros/signal.h.m4: Added emit_reverse(). + +This is the HEAD branch, for API/ABI-compatible API additions. +See also the libsigc-2-0 branch. + +2005-12-01 Murray Cumming + + * sigc++/functors/slot_base.cc: + slot_base::disconnect(): Set call_ to 0, + to invalidate the slot, even if parent_ is 0. + I think parent_ is, for instance, a signal, but + disconnect should still work on a slot that is not + connected to a signal, because a slot can be invoked + directly. + Fixes bug #311057 from James Lin. + +2005-12-01 Murray Cumming + + * tests/Makefile.am: + * tests/test_slot_disconnect.cc: Added test + case from bug #311057. + +2005-11-16 Philipp Berndt + + * sigc++/adaptors/macros/exception_catch.h.m4: Make member + exception_catch_functor::catcher_ + public so that it can be accessed by visit_each() + (bug fixed for generalization on 2004-11-06) + +2.0.16: + +2005-08-01 Neal E. Coombes + + * sigc++/signal_base.h: Updated the documentation for temp_slot_list + as requested in bug #303896. + +2005-08-01 Murray Cumming + + * sigc++/adaptors/hide.h.m4: Added missing + ) in call to sun_forte_workaround(), fixing + build on SUN Forte 5.5. Bug #312020. + +2005-08-19 Bruno Martinez + + * sigc++/type_traits.h: Renamed + ::sigc::is_base_and_derived::internal to + ::sigc::is_base_and_derived::internal_class + in order to avoid conflict with + namespace internal. + +2005-07-13 Murray Cumming + + * docs/manual/libsigc_manual.xml: Correct mentions of + 1.2 stuff instead of 2.0. Patch in bug #310213 from + pebble.org.uk. + +2005-07-13 Murray Cumming + + * docs/manual/libsigc_manual.xml: Fixed typo + found by Antonio Coralles. + +2005-07-09 Murray Cumming + + * sigc++/macros/signal.h.m4: Did the same (see + last commit) for slot_const_iterator and + slot_iterator_buf. + +2005-07-09 Murray Cumming + + * sigc++/macros/signal.h.m4: slot_iterator: + operator--() now returns value, not reference, like + operator++() already did. This caused crashes when + using --no-inline with g++. Bug #308651 by + Michael Andres. + +2.0.15: + +2005-07-04 Philip Langdale + + * sigc++/adaptors/macros/compose.h.m4: Add a setter typedef to + compose*_functor and use it instead of the (incorrect) getter + typedef in the compose* specialization of visit_each<>(). + This corrects the lifetime management of slots created with + compose(). Bug #308433. + +2005-06-13 Marek Rouchal + + * tests/test_deduce_result_type.cc: Specify int return type + for main(), to be more ISO C++ compliant. Bug #307478. + +2005-06-11 Andris Pavenis + + * sigc++/adaptors/lambda/macros/base.h.m4: + * sigc++/adaptors/lambda/macros/select.h.m4 + * sigc++/adaptors/macros/hide.h.m4: Specify only a type (not a + parameter name) for unused member function parameters + +2005-06-12 Paul Pogonyshev + + * configure.ac: + * scripts/cxx.m4: + * sigc++config.h.in: Add test for whether the compiler allows + referencing to member functions of the class/structure being + declared from a definition of a static member variable. + Supposedly a generic solution for GCC 3.2 compilation problems. + + * sigc++/type_traits.h: Define SIGC_WRAP_IS_BASE_CLASS_ based on + results of the above test. + (struct is_base_and_derived): Wrap up is_base_class_() functions + in an internal class if SIGC_WRAP_IS_BASE_CLASS_ is defined. + +2005-06-10 Murray Cumming + + * sigc++/adaptors/macros/bind.h.m4: + * sigc++/functors/macros/slot.h.m4: + * sigc++/macros/signal.h.m4: Use CALL_SIZE instead of + hard-coded 7s and 6s. + +2.0.14: + +2005-06-10 Murray Cumming + + * sigc++/visit_each.h: Make the + limit_derived_target::with_type inner class an outer class, + to satisfy the SUN CC 5.7 compiler, though I think it is a + compiler bug. Bug #302098 has the test case. + +2.0.13: + +2005-06-07 Murray Cumming + + * tests/test_compatibility.cc: Specify the actual class when + using test_int(), instead of the derived class, to fix the build + on SUN Forte CC 5.5. Patch from Friedemann Kleint in + Bug #305647 + +2005-06-07 Murray Cumming + + * sigc++/macros/signal.h.m4: signal_emit::emit(): Use scope to + ensure a certain order of destruction of the member variables, to + avoid a leak on MSVC++. Patch by Andreas Ames in Bug #306249. + +2005-06-07 Murray Cumming + + * sigc++/macros/signal.h.m4: Added comments about commenting-out + SIGC_TYPEDEF_REDEFINE_ALLOWED when using SUN Forte CC 5.7, + because I can not seem to create a test for it. + +2005-06-07 Murray Cumming + + * configure.ac: + * scripts/cxx_std.m4: + * sigc++/macros/signal.h.m4: + * sigc++config.h.in: Added check for + the non-standard SUN Forte reverse_iterator<>, + and used it. This is based on the same stuff in + gtkmm. + +2005-06-07 Murray Cumming + + * sigc++/visit_each.h: limit_derived_target(): Just some whitespace + changes. + +2005-05-16 Neal E. Coombes + + * sigc++/signal_base.h: Modified temp_slot_list to be a temporary view + into a slot list. Instead of emptying the original it now simply tacks + a placeholder to the end of the original. It then uses this as it's + 'end' iterator. This should allow for conscious recursiveness, as well + as inserting a slot to any position in the slot list during emittion. + See bug #303896. + +2005-06-04 Friedemann Kleint + + * sigc++/macros/limit_reference.h.m4: + visit_each() template specializations: + Mention the bool I_derives_trackable + template type, to fix the build on Solaris + Forte 5.5. + +2.0.12: + +2005-05-06 Régis Duchesne + + * sigc++/macros/limit_reference.h.m4 (added): + * sigc++/Makefile.am: + New class that just stores a reference, and makes sure that if the + reference derives from trackable, then the trackable reference will be + used instead of the derived reference in visit_each(). + * sigc++/functors/macros/mem_fun.h.m4: Better fix for bug #169225 by + Régis Duchesne and Christian Hammond, based on the new limit_reference + class. + * sigc++/adaptors/bound_argument.h (added): New class (built upon the + new limit_reference class) that handles all 3 kinds of bound arguments: + by value, by reference, and by constant reference. References are + unwrapped in the bound_argument's constructor. + * sigc++/adaptors/macros/bind.h.m4: Fix for bug #302327 by Régis + Duchesne. Bound arguments now need to know whether they are passed by + reference or not. So bind() now builds bind_functor instances using + 'reference_wrapper' types, instead of 'Foo &' types. The + bind_functor code is modified to compensate. + * sigc++/adaptors/macros/bind_return.h.m4: Similar fix for a similar + bug (unfiled) with bound return arguments. + * sigc++/reference_wrapper.h: + * sigc++/type_traits.h: + The reference_wrapper class is only used in bound_argument.h. Put + correct but unused code under #if 0. + * sigc++/adaptors/lambda/base.h: This file needs reference_wrapper.h, + but was incorrectly relying on type_traits.h to include it. + * tests/Makefile.am: + * tests/test_virtualbase_delete.cc (deleted): + * tests/test_virtualbase_delete_ref_param.cc (deleted): + * tests/test_limit_reference.cc (added): + Replaced test_virtualbase_delete*.cc with a simpler + test_limit_reference.cc which checks for all 3 aspects of the same bug + in one file. + * tests/test_bind_ref.cc: Slots must use 'Foo &' types. We were lucky + this broken usage worked before this change. The change in + type_traits.h made this bug obvious, by preventing the code to compile. + * tests/test_bind_return.cc: After my change, bind() and bind_return() + must use 'reference_wrapper' types. + * tests/test_custom.cc: Made this test a no-op (so it does not perturb + 'make check' on released versions of the library) and made it a + template ready to be modified by hackers. + +2005-05-01 Murray Cumming + + * sigc++/functors/slot_base.cc: + slot_base::slot_base(src): If the source + slot_base has a null rep->call_, meaning that the + slot is invalid, just return a default-constructed + slot, to prevent the crash shown in + tests/tests_copy_invalid_slot.cc. Bug #302515 by + Régis Duchesne. + +2005-05-01 Murray Cumming + + * sigc++/functors/macros/mem_fun.h.m4: bound_*<>: + Add a new is_base_and_derived + parameter to the template and thereby provide a + specialization for T_Obj types that derive from + sigc::trackable. This prevents a crash when casting + from the derived type to sigc::trackable after the + derived destructor has run. This cast can sometimes + fail when using multiple inheritance, at least with + g++. Bug #169225 by Régis Duchesne and Christian + Hammond. + * sigc++/type_traits.h: Add documenation for + the internal is_base_and_derived<> template, which + allows us to specialize other templates for certain + template types. + +2005-04-28 Murray Cumming + + * sigc++/type_traits.h: Added comments for users of + g++ 3.2. + +2005-04-28 Murray Cumming + + * tests/Makefile.am: + * tests/test_virtualbase_delete.cc: Added + simplified test case from bug #169225. We have a patch + to make this succeed but I am not ready to commit it + just yet. + +2005-04-27 Murray Cumming + + * tests/Makefile.am: + * tests/test_custom.cc: + Added a place to put extra test code, so I don't have + to keep installing my crazy libsigc++ versions. + +2005-04-27 Murray Cumming + + * sigc++/visit_each.h: Revert back to the non-explicit + template call, because we can not specify the + template specialization so easily, because the + specializations have different numbers of types. + * tests/Makefile/am: + * tests/test_bind_ref.cc: Add a simple test only for + sigc::ref disconnection. + +2005-04-26 Murray Cumming + + * sigc++/visit_each.h: Use the explicit template + specialization, needed for Tru64 and AIX compilers. + This causes a crash in some uses of sigc::ref() + (when using g++ 3.3.4 or 3.3.5 , but not with 3.4) but + seems to fix a crash in some uses of multiple inheritance + (bug #169225). + * tests/test_bind.cc: Comment out the crashing (not with + g++ 3.4) use of sigc::ref() with an explanatory comment. + +2.0.11: + +2005-03-09 Cedric Gustin + + * Makefile.am: Moved MSVC_Net2003 directory to SUBDIRS. + * MSVC_Net2003/Makefile.am: Added blank.cpp to EXTRA_DIST. + * MSVC_Net2003/libsigc++2_msvcNet2003.sln: Removed + test_accumulated and test_lambda projects as the tests are + disabled in the standard, configure-based build. + * MSVC_Net2003/MSVC_Net2003/libsigc++2_msvcNet2003.vcproj: + Generate a PDB file in the Debug target. + +2005-03-05 Murray Cumming + + * docs/website/stable.html: Mention actual supported compilers. + * docs/website/docs.html: Removed broken examples links. Change + reference link to the reference overview page. + +2005-02-23 Murray Cumming + + * sigc++/functors/slot_base.h: Make slot_base::operator=() public, to + fix the build with SUN Forte C++ 5.5 and Tru64. + +2.0.10: + +2005-02-20 Murray Cumming + + * tests/test_slot.cc, test_disconnect.cc: #included to avoid + an unresolved symbol error with the Tru64 compiler. Solution found by + Tim Mooney in bug #161503. + +2005-02-20 Martin Schulze + + * sigc++/signal_base.h: Add some documentation. + +2005-02-20 Martin Schulze + + * sigc++/signal_base.cc: Reset deferred_ flag to false in + signal_impl::sweep() (Neal E. Coombes). Partly fixes bug #167714. + +2005-02-11 Martin Schulze + + * docs/manual/Makefile.am: Set the correct group in post-html. + +2005-02-11 Murray Cumming + + * docs/website/doc.shtml: Fix typo in url for reference docs. Found by + James Lin. + +2005-02-06 Murray Cumming + + * sigc++/signal_base.h: temp_slot_list::begin(), end(): Actually + return the iterators. + +2005-02-03 Neal E. Coombes + + * sigc++/signal_base.h: Add temp_slot_list struct to facilitate + allowing new connections to a signal during an emittion without + affecting that emittion. + * sigc++/macros/signal.h.m4: Use the new struct temp_slot_list to + prevent connections made during an emittion from being called in the + same emittion (which has the potential of causing things like + infinite loops). This guarantees an emittion will be finite, as well + as maintaining any order of emittion guarantees that may have already + been in place. + +2.0.9: + +2005-02-02 Murray Cumming + + * sigc++/visit_each.h: visit_each_type(): Reverted the change, so that + we do not specify the template types ot visit_each<>(), because it + crashes on g++ 3.3.4 (but not g++ 3.4.2). Added a comment telling users + of AIX (and maybe IRIX MipsPro and Tru64) to use the alternative version + if they have compilation problems. + +2005-02-01 Murray Cumming + + * sigc++/adapators/macros/base.h.m4: Add sigc::var<>() documentation, + from Roger Ferrer Ibáñez in bug #149483. + +2005-02-01 Murray Cumming + + * sigc++/adaptors/macros/compose.h.m4: In the template specializations + of visit_each(): As before, specify the specific other template + specializations of visit_each that we use. Needed by AIX. + * tests/Makefile.am: Reenabled most tests, because AIX can now + build them. + +2005-02-01 Murray Cumming + + * sigc++/visit_each.h: visit_each_type(): Specify the specific + template specialization of visit_each<>() to use. The AIX compiler, + and possibly the Tru64 compiler, need this extra hint. + +2005-02-01 Murray Cumming + + * bind.h.m4: Define bind_functor::operator() inline because the AIX + compiler/linker sometimes fails to find it when it is defined + outside of the class. + +2.0.8: + +2005-01-30 Murray Cumming + + * sigc++/type_traits.h: is_base_and_derived: Added + avoid_gcc3_warning_(), to avoid an incorrect warning when using + g++ 3.3.5 + +2005-01-28 Liza Klerck + + * sigc++/functors/macros/mem_fun.h.m4: Add a sigc:: namespace + prefix to the nested use of visit_each(), to avoid ambiguity when + using 2 versions of the libsigc++ API inside different namespace. + +2005-01-27 Murray Cumming + + * sigc++/adaptors/macros/adaptor_trait.h.m4: Add a sigc:: namespace + prefix to the nested use of visit_each(), to avoid ambiguity when + using 2 versions of the libsigc++ API inside different namespace, + which is not very advisable anyway. Bug #165222 from + liza at trdlnk.com. + +2.0.7: + +2005-01-24 Cedric Gustin + + * sigc++config.h.in : Moved the SIGC_USING_STD macro definition + out of the SIGC_CONFIGURE section. We also need it for MSVC. + * MSVC_Net2003/.cvsignore : Added .def and .aps files + * MSVC_Net2003/Makefile.am: Rewrote rule for local copy of + sigc++config.h (required for 'make distcheck'). + * MSVC_Net2003/libsigc++2_msvcNet2003.sln: Added test_retype and + test_disconnect_during_emit tests. + * MSVC_Net2003/tests/test_disconnect_during_emit/*, + MSVC_Net2003/tests/test_retype/*: Initial commit. + +2005-01-21 Murray Cumming + + * tests/: Disabled the test_accumulator, test_bind, and test_compose + tests, and part of test_mem_fun because the AIX xlC compiler can not + build them, but it can still do most things, including the examples. + See the comments in tests/Makefile.am. + +2005-01-21 Murray Cumming + + * sigc++/adaptors/bind.h.m4: non-member operator()(): Specify the + extra nil arguments in the templated class name prefix. Oddly, the + AIX xlC compiler says that the type of the first parameter does not + match the template if you don't do this. + +2005-01-21 Murray Cumming + + * sigc++/type_traits.h: is_base_and_derived struct: Move the + is_base_class_() functions out of the inner class, because the AIX + xlC compiler does not like that - see the comments in the code. + * sigc++/adaptors/bind.h.m4: Add the extra nil template types to + the template specializations, as in slot and signal. + +2005-01-21 Murray Cumming + + * sigc++/functors/macros/slot.h.m4, sigc++/macros/signal.h.m4: + slot and signal template specialization for + various numbers of template args: In the class slot line, specify + all the remaining template types as null, instead of expecting the + compiler to guess them in itself. This partly fixes the build on + AIX with the xlC compiler. Bug #164685. + +2005-01-19 Murray Cumming + + * sigc++/type_traits: struct is_base_and_derived: Make the test inner + struct a friend, so that it can use the big inner struct. This is + required by the Tru64 compiler. + * sigc++/adaptors/lambda/base.h: Put the unwrap_lambda_value() + definitions at the top, because Tru64 (understandably) needs them to + be declared before use. + +2005-01-19 Murray Cumming + + * scripts/: Added cxx_std.m4, with a test copied from + glibmm/scripts/cxx_std.m4 to check if the compiler has the std:: + namespace. + * sigcconfig.h: #undef the new #define and add SIGC_USING_STD(), + like GLIBMM_USING_STD, to put stuff in the std:: namespace when it + is not there already, + * configure.in: Used the new test. + * tests/*: Uses SIG_USING_STD() for every std:: thing that we use. + This is needed by the Tru64 and HP-UX compilers when using their + defaults. + +2005-01-19 Murray Cumming + + * configure.in: AC_INIT(): Provide the extra tarball name parameter, + so that it does not create a libsigc--- tarball. + +2005-01-19 Murray Cumming + + * configure.in: AC_INIT(): Use libsigc++ instead of sigc++, attempting + to get the correct tarball name. + +2005-01-18 Murray Cumming + + * configure.in: Used the autoconf 2.93 and AM_INIT_AUTOMAKE() + technique to specify ustar format for the tarball, to prevent files + with long file names from appearing at the top of the tarball. + Based on the same fix in gtkmm 2.6. + +2005-01-18 Murray Cumming + + * sigc++/functors/macros/slot_h.m4: Specify the base class when + using the rep_ member variable. This stops the HP-UX aCC compiler + from saying that a Nonstatic member is referenced in a nested class, + local class or static member initializer. Bug #150719. + +2005-01-18 Murray Cumming + + * Bug #159597 - patch from e97_far at e.kth.se to replace C-style + casts with reinterpret_cast<> and static_cast<> to avoid warnings. + +2005-01-17 Murray Cumming + + * docs/manual/Makefile.am: Specifying html/index.html instead of + just the html directory as a target seems to fix distcheck problems. + I can also now confirm that the install works on solaris, when using + gmake, though not when using make. + +2005-01-17 Murray Cumming + + * MSVC_Net2004/Makefile.am: Add built files to DISTCLEANFILES to fix + the distcheck. + * docs/reference/Makefile.am, manual/Makefile.am: Specify $srcdir in + paths, to fix distcheck of the manual, and maybe fix install problems + on Solaris. + +2005-01-11 Murray Cumming + + * docs/website/stable.html: Updated the text about binary packages. + * docs/website/docs.html: Link to the 2.0 documentation instead of the + 1.2 documentation. + +2004-12-17 GregSchussman + + * glossary.shtml: Clean up punctuation, make definitions complete + sentences, and add clarifications for certain definitions according to + what Murray Cumming's suggestions and answers to my questions. + Bug #161580. + +2005-01-11 Murray Cumming + + * docs/: Added manual, copied from the libsigc++-1.2 cvs module, + and updated it for the new 2.0 API. + +2005-01-11 Murray Cumming + + * docs/: Added website, copied from the libsigc++-1.2 cvs module. + We will use it from here from now on. + +2004-12-11 Cedric Gustin + + * configure.ac : parse version tags at configure time (for + sigc-2.0.rc). + * MSVC_Net2003/sigc-2.0.rc.in : New resource file. + * MSVC_Net2003/Makefile.am: include sigc-2.0.rc in distribution. + +2004-12-08 Cedric Gustin + + * MSVC_Net2003/Makefile.am: get sigc++config.h from $(top_builddir) + instead of $(top_srcdir). + +2004-12-08 Cedric Gustin + + * MSVC_Net2003/*/*.vcproj: Renamed libsigc++ target to + sigc-2.0d.dll (Debug) and sigc-2.0.dll (Release). Added + $(SolutionDir) and $(SolutionDir)\.. to "Additional Include + Directories" in tests projects. + * sigc++config.h.in: Rewrote dllexport/dllimport macros for + MSVC, for better consistency with glibmm/gtkmm. + * MSVC_Net2003/Makefile.am: copy sigc++config.h from $(top_srcdir) + at build time. + +2004-11-27 Murray Cumming + + * configure.in: Revert the AC_PROG_LIBTOOL change, so that this builds + with actually released libtool versions, and in jhbuild, so that it + gets testing. + +2004-11-06 Martin Schulze + + * sigc++/adaptors/macros/exception_catch.h.m4: Make catcher_ member + public so that it can be accessed by visit_each() (bug reported on + ml by Philip Langdale ). + +2004-10-24 Martin Schulze + + * MSVC_Net2003/*/*.vcproj: Link with the "multithreaded DLL" runtime + libraries and enable RTTI for the MSVC build + (patch from Timothy M. Shead ). + * MSVC_Net2003/*/.cvsignore: Hide generated build files from cvs + (patch from Timothy M. Shead ). + +2.0.6: + +2004-10-12 Martin Schulze + + * MSVC_Net2003/*/*.vcproj, MSVC_Net2003/blank.cpp: Fix project files + to compile out-of-the-box and add dummy file so that .cc files get + recognized as c++ code files (patch from Timothy M. Shead). + +2004-10-10 Martin Schulze + + * sigc++/signal_base.{h,cc}, sigc++/functors/slot_base.{h,cc}, + sigc++/functors/macros/slot.h.m4: If SIGC_NEW_DELETE_IN_LIBRARY_ONLY + is defined, implement signal_base::operator new/delete and + slot_rep::operator new/delete (suggested by Timothy M. Shead). + Remove old work-around from 2004-10-02 since it didn't work. + +2004-10-07 Martin Schulze + + * configure.ac: Update for libtool 1.5a (with support for Intel C++). + * MSVC_Net2003/sigc++config.h: Remove bogus '#define' + (reported by Timothy M. Shead ). + +2004-10-02 Martin Schulze + + * configure.ac: Bump version number to 2.0.6. + * NEWS: Add ChangeLog summary for version 2.0.6. + +2004-10-02 Martin Schulze + + * sigc++/functors/slot_base.{h,cc}, sigc++/functors/macros/slot.h.m4: + Rename (typed_)slot_rep::detach to (typed_)slot_rep::destroy. + Call the dtor of the functor stored in typed_slot_rep from destroy(). + A cleaner solution would be to add an additional "virtual" function + that calls 'delete' or a real virtual dtor. However, this would be + less efficient and might break the ABI. (Fixes #152323.) + +2004-10-02 Martin Schulze + + * sigc++config.h.in, MSVC_Net2003/sigc++config.h, + sigc++/signal_base.cc, sigc++/functors/slot_base.{h,cc}, + sigc++/functors/macros/slot.h.m4: Define and use new macro + SIGC_NEW_DELETE_IN_LIBRARY_ONLY to ABI-compatibly move + all calls to new and delete into non-inline library code. + +2004-09-26 Martin Schulze + + * sigc++/adaptors/lambda/macros/group.h.m4: Add a missing + template keyword in the definition of deduce_result_type::type + (hopefully fixes #152327). + +2004-09-26 Martin Schulze + + * sigc++/macros/object_slot.h.m4: Use correct bound_mem_functor + variants for const (volatile) methods (fixes #148744). + +2004-09-01 Martin Schulze + + * docs/index.html: Correct link to lambda module. + +2004-09-01 Martin Schulze + + * README: Update compatibility section. + +2.0.5: + +2004-09-01 Martin Schulze + + * MSVC_Net2003/Makefile.am: Add sigc++config.h to EXTRA_DIST. + * configure.ac: Bump version number to 2.0.5. + * NEWS: Add ChangeLog summary for version 2.0.5. + +2.0.4: + +2004-08-21 Martin Schulze + + * tests/test_lambda.cc: Use sigc::var("\n") instead of sigc::ref("\n"). + Comment out the affected lines, nevertheless. + Sun FORTE and Compaq C++ can handle neither sigc::ref("\n") nor + sigc::var("\n"). I see more chances fixing sigc::var("\n"). + * sigc++/adaptors/lambda/macros/base.h.m4: Add a comment about a + possible work around for sigc::var("\n") compiler problems. + * tests/test_compatibility.cc: Remove a 'const' keyword that prevents + the test case from compiling with the Sun FORTE. + * tests/test_trackable.cc: Remove a 'virtual' keyword and an unused + variable to avoid compiler warnings. + * NEWS: Add ChangeLog summary for version 2.0.4. + +2004-08-03 Martin Schulze + + * scripts/cxx.m4, sigc++config.h.in, configure.ac, + sigc++/adaptors/lambda/macros/operator.h.m4, tests/test_lambda.cc: + Rollback change from 2004-07-15: configure check + SIGC_OPERATOR_OVERLOAD_AMBIGUITY is not needed - the overload + ambiguity doesn't occur if the lambda operators take all arguments + as const reference. + * configure.ac: Bump version number to 2.0.4. + +2004-08-03 James Lin + + * Added SIGC_API qualifier to all externally-visible non-template + classes/structs. + * Added #include to the files that use SIGC_API. + * Added empty SIGC_API definition to sigc++config.h.in for non-MSVC + compilers. I'm not sure if this is the right place to put this + (probably not). + * Added MSVC-specific sigc++config.h to the MSVC project directory. + (The comment in it probably should be edited.) + * Changed MSVC project settings to output a multi-threaded DLL, set + the include paths to work (hopefully) out-of-the-box. Disabled + precompiled headers, since they just complicate things and + shouldn't be necessary for such a relatively project. + +2004-08-01 Martin Schulze + + * sigc++/type_traits.h: Remove type_trait<>::instance() + (was unimplemented and unused; caused problems with the MSVC). + +2004-07-23 Martin Schulze + + * Makefile.am: Fix typo concerning distribution of libsigc++-2.0.spec. + * AUTHORS: Mention our contributors for platforms Sun FORTE and Intel C++. + +2004-07-15 Martin Schulze + + * *.h.m4: Don't call operator()() in sun_forte_workaround(); rather copy + operator()(). Calling operator()() makes a copy of the arguments causing + wrong results if an argument type is a reference. Hopefully fixes #147311. + +2004-07-15 Martin Schulze + + * tests/test_lambda.cc: Break "std::cout << [expr] << a << std::endl;" + into "std::cout << [expr]; std::cout << a << std::endl;". + I hope this fixes #147313 where the right values for "[expr]" but wrong + values for "a" were written to std::cout for some compiler with optimizations + turned off. + +2004-07-15 Martin Schulze + + * sigc++/adaptors/lambda/macros/operator.h.m4: Correct return type deduction + of lambda expressions in lambda_operator*::operator()(). Might be related to + bug #147313. + * sigc++/adaptors/lambda/macros/group.h.m4: Use m4 macro _P_(). + +2004-07-15 Martin Schulze + + * scripts/cxx.m4, sigc++config.h.in, configure.ac, + sigc++/adaptors/lambda/macros/operator.h.m4, tests/test_lambda.cc: + Add configure check SIGC_OPERATOR_OVERLOAD_AMBIGUITY for a SUN FORTE + compiler problem (bug #147391). Use it to decide whether the lambda + action operators may be overloaded (not doing so restricts the API slightly). + * sigc++/adaptors/lambda/macros/operator.h.m4: Add some doxygen comments + and remove attic code. + * sigc++/adaptors/lambda/macros/base.h.m4: + Add templates unwrap_lambda_type and unwrap_lambda_value() to support + the non-overloaded lambda action operators. Also add some doxygen comments + and remove attic code. + * sigc++/adaptors/lambda/macros/group.h.m4: Fix a bug that resulted in + gargabe values being passed on to the functor contained in the group adaptor + (partly fixes #147313). + +2004-07-11 Martin Schulze + + * scripts/cxx.m4, sigc++config.h.in, configure.ac, *.h.m4: + Split SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + into SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + and SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD. + Remove LIBSIGC_TEMPLATE_PREFIX. Add template keyword to + SIGC_WORKAROUND_OPERATOR_PARENTHESES depending on the configure checks. + Should fix the compiler problems with MSVC. + +2004-07-11 Martin Schulze + + * examples/hello_world.cc: Use sigc::ptr_fun instead of std::ptr_fun. + (fixes bug #144846) + +2004-07-11 Eric Bourque + + * libsigc++-2.0.spec.in: new file + * configure.ac : patched generate spec file + * .cvsignore: ignore generated file (Martin Schulze) + * Makefile.am: distribute spec file (Martin Schulze) + +2004-07-11 Murray Cumming + + * sigc++/connection.cc: Added some comments. + * sigc++/trackable.cc: operator=(): Check for self-asignment, though I + do not know of any actual bug that this fixes. Added some comments. + * sigc++/trackable.h Added some doxygen documentation. + +2004-07-09 Murray Cumming + + * tests/: Added test_disconnect_during_emit.cc, to prove that this + works. + +2004-07-08 Murray Cumming + + * tests/test_retype_return.cc: foo::operator(int): return a + value. The SUN Forte 5.5 compiler complains about this, as it should. + +2004-07-08 Murray Cumming + + * sigc++/macros/signal.h.m4: class signal*: Rename the slot_list + typedef to slot_list_type, because there is already a template class + called slot_type. SUN Forte 5.5 seems to complain about this and I am + not surprised. The old typdef is still there for backwards + compatibility, except when building with SUN Forte. + +2004-07-07 Murray Cumming + + * scripts/cxx.m4: SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD(): + Don't define the SIGC_TEMPLATE_SPECIALIZATOIN_OPERATOR_OVERLOAD C + macro at all if the test fails. This might fix the build on SUN Forte. + * sigc++/functors/macros/mem_fun.h.m4: Default constructor: Initialize + the func_ptr_ member variable. I have no evidence that this solves any + problems, but it worried me. + * sigc++/functors/slot_base.h: operator bool(): Correct documentation, + to use @code instead of + * sigc++/macros/signal.h.m4: Remove the documentation for the + parameters named first and last, because they do not exist. + +2004-05-31 Martin Schulze + + * autogen.sh: Add '--force'-flag to the 'libtoolize'-command (bug #143425). + +2.0.3: + +2004-05-30 Martin Schulze + + * configure.ac: Bump version number to 2.0.3. + * NEWS: Add ChangeLog summary for version 2.0.3. + * sigc++/macros/signal.h.m4: Fix segfault on emission of unconnected signal. + * tests/test_signal.cc, tests/test_accumulated.cc: Emit unconnected signal. + * sigc++/macros/object_slot.h.m4: Suppress compiler warning at + dynamic_cast<>-test (tested by Christof Petig/Timothy M. Shead). + +2.0.2: + +2004-05-22 Martin Schulze + + * configure.ac: Bump version number to 2.0.2. + * NEWS: Add ChangeLog summary for version 2.0.2. + +2004-05-20 Martin Schulze + + * sigc++/macros/signal.h.m4: If a custom accumulator is specified + invoke it on signal emission even if the signal's slot list is empty. + (This used to be the case in libsigc++-1.2 as pointed out by Timothy.) + +2004-05-20 Martin Schulze + + * sigc++/macros/object_slot.h.m4: Suppress compiler warning at + dynamic_cast<>-test (suggested by Timothy M. Shead). + +2004-05-01 Martin Schulze + + * README: Updated for libsigc++-2.0. + +2.0.1: + +2004-04-27 Martin Schulze + + * configure.ac: Bump version number to 2.0.1. + * NEWS: Add ChangeLog summary for version 2.0.1. + * sigc++/adaptors/lambda/macros/base.h.m4: Fixed documentation. + * sigc++/adaptors/macros/bind.h.m4: Hide work-arounds from doxygen. + * scripts/cxx.m4, sigc++config.h.in, configure.ac, + sigc++/adaptors/macros/bind.h.m4: Removed configure check. It + showed that the Apple gcc can also compile the sophisticated version + of the work-around. + +2004-04-26 Martin Schulze + + * sigc++/macros/object_slot.h.m4: Modified test for SigC::Object + inheritance so that it also works if SigC::Object is virtual base. + (Fixes bug 141094 reported by Jonathan Brandmeyer) + +2004-04-26 Martin Schulze + + * scripts/cxx.m4: Updated the configure check. It would probably + have succeeded on the Apple. + +2004-04-26 Martin Schulze + + * sigc++/adaptors/macros/bind.h.m4: Add work-arounds for + bind<-1>::deduce_result_type compilation error on Apple gcc 3.3. + * scripts/cxx.m4, sigc++config.h.in, configure.ac: Add configure + check for the compilation error above. + * sigc++/adaptors/lambda/macros/operator.h.m4: Replace _A with + _Aa. _A is a reserved keyword on Apple gcc 3.3 (Spundun Bhatt). + (fixes bug #10444 reported by Spundun Bhatt) + +2004-04-19 Martin Schulze + + * sigc++/signal_base.cc: Fixed serious bug in signal_base::impl(): + Only reference a newly created object (initial reference). + (This fixes bug #140269 reported by Andris.) + +2004-04-19 Murray Cumming + + * scripts/cxx.m4: Updated the operator() template check, because it + failed with gcc 3.4 (from cvs). Apparently the template keyword can + only be used from another template. + +2.0.0: + +2004-04-06 Martin Schulze + + * configure.ac: Bump version number to 2.0.0. + * NEWS: Add ChangeLog summary for version 2.0.0. + * TODO, AUTHORS: Bring up to date. + * sigc++-2.0.pc.in, Makefile.am: 1.9 -> 2.0 + * Added more documentation. + +2004-04-10 Murray Cumming + + * sigc++/connection.[h|cc]: Implement blocked() to avoid undefined + symbol linker error. + +2004-04-08 Murray Cumming + + * dist the scripts directory. + +1.9.16: + +2004-04-06 Martin Schulze + + * configure.ac: Bump version number to 1.9.16. + * NEWS: Add ChangeLog summary for version 1.9.16. + +2004-04-02 Murray Cumming + + * sigc++/connection.cc: Make block() and unblock() always return a + value, to fix compiler warnings. Patch from bug #138620 by + Alexander Nedotsukov. + +2004-04-02 Murray Cumming + + * Fix the compile of examples/member_method.cc. Bug #131701 from + Kirill Smelkov. I also made the examples build as part of the regular + build. + +2004-04-02 Murray Cumming + + * sigc++config.h.m4: Remove every undef apart from the one we need, to + avoid clashes, because we #include this in a public header. + +2004-03-25 Murray Cumming + + * scripts/cxx.m4, configure.in, sigc++config.h.in: Rename the + template_keyword check to template_specialization, because the problem + is with or without the keyword. + * sigc++/adaptors/macros/adaptor_trait.h.m4: Define + SIGC_WORKAROUND_OPERATOR_PARENTHESES, which calls either operator() or + sun_forte_workaround() depending on the result of the compiler test. + * many .m4 files: Add sun_forte_workaround methods that call the + operator() methods. Put them in #ifdefs so that only SUN Forte C++ + sees them. + +2004-03-22 Murray Cumming + + * Makefile.am, sigc++/Makfile.am: Fix the sigc++config.h.in disting, + to fix make distcheck. + +2004-03-21 Murray Cumming + + * Rename config.h.in to sigc++config.h.in so that gtkmm does not + include some other config.h at strange times - fixes a problem in + the gtkmm demos. This should really be in the sigc++ directory, but + that seems to add that as an include path, which causes the STL + headers to include sigc++/signal.h instead of some STL signal.h header. + +2004-03-20 Murray Cumming + + * Makefile.am: Install the config.h platform-specific header. + * sigc++-2.0.pc.in: Report the include path for config.h + +2004-03-20 Murray Cumming + + * Added config.h.in, using autoheader, from which config.h will be + generated, so we can detect compiler features. + * configure.ac: Added AC_CONFIG_HEADER(config.h) to generate config.h + from config.h.in. + * scripts/cxx.m4: Added this directory and file, with a + SIGC_CXX_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD macro that defines + the SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD C macro. + * autogen.sh: Added -I scripts to the aclocal call, so that it finds + the m4 macro for configure.ac. + * sigc++/adapators/macros/adaptor_trait.h.m4: Include config.h and + use SIGC_TEMPLATE_KEYOWRD_OPERATOR_OVERLOAD. + +2004-03-18 Martin Schulze + + * tests/test_mem_fun.cc, tests/test_ptr_fun.cc: Don't test + making functors from overloaded methods with partial template + specialization. Not portable among different compilers (SUN FORTE). + * adaptors/macros/apdaptor_trait.h.m4: Only gcc seems to use the + notation A.template operator()<...>(...) => adapt preprocessor check + for #define LIBSIGC_TEMPLATE_PREFIX. TODO: replace with configure check. + +2004-03-13 Murray Cumming + + * g++ 3.4 (pre-release) build fixes: + * sigc++/macros/signal.h.m4: slot_iterator_buf::operator*(): + Use blocked() and empty() instead of non-existant blocked_and_empty(). + * sigc++/functors/macros/mem_fun.h.m4: memfun_functor*::operator()(): + Use this->func_ptr_ instead of just func_ptr_. + * sigc++/adaptors/macros/deduce_result_type.h.m4: Use + T_functor::template deduce_result_type<> instead of just + T_functor::deduce_result_type<>. + * sigc++/adaptors/lambda/macros/base.h.m4, operator.h.m4, group.h.m4:: + Use template keyword again. operator[](): Use this->value_ instead of + just value_. + * sigc++/adaptors/lambda/macros/bind/m4: Use template keyword, and + this-> again. + * sigc++/adaptors/macros/compose.h.m4, hide.h.m4, bind_return.h.m4, + exception_catch.h.m4: + rettype.h.m4, rettype_return.h.m4: Use template keyword,and this-> again + +1.9.15: + +2004-02-27 Martin Schulze + + * configure.ac: Bump version number to 1.9.15. + * NEWS: Add ChangeLog summary for version 1.9.15. + +2004-02-27 Martin Schulze + + * sigc++/functors/macros/slot.h.m4: Make the unnumbered slot templates' + copy ctors use the copy ctors of the base class. Fixes bug #24698. + * tests/test_slot.cc: Test copy ctor (Bryan Forbes). + +2004-02-27 Martin Schulze + + * tests/type_functor_trait.cc: Bring it up-to-date (use sigc::ref). + Make it work with the SUN Forte. + +2004-02-24 Martin Schulze + + * sigc++/type_traits.h: Make is_base_and_derived<> work with the SUN Forte. + +2004-02-19 Martin Schulze + + * sigc++/type_traits.h: Make is_base_and_derived<> platform independant. + * sigc++/adaptors/lambda/macros/base.h.m4: Make lambda_core<> ctors + explicit. Remove an unused ctor from lambda_core. + +2004-02-14 Martin Schulze + + * sigc++/functors/slot_base.h, sigc++/functors/macros/slot.h.m4: + Move some documentation to slot_base.h. + * sigc++/signal_base.h, sigc++/macros/signal.h.m4: + Move some documentation to signal_base.h. + + API addition: + * sigc++/functors/macros/slot.h.m4: Add numbered slot# templates. + Make unnumbered slot templates inherit from slot#. + + API change: + * sigc++/functors/macros/mem_fun.h.m4: Allow for methods of the object's + base types to be passed into sigc::mem_fun(). (Used to be the case in + libsigc++-1.2). + +2004-02-13 Murray Cumming + + * sigc++/functors/slot_base.[h|cc], sigc++/trackable.[h|cc]: Create + and use a typedef for the destroy_notify callback functions, to avoid + confusion function pointer declaration syntax in the API. + +2004-02-13 Murray Cumming + + * Moved implementation to .cc files: + * sigc++/functors/: Added slot_base.[h|cc] which contains non-template + code that was previsouly in the generated functors/slot.h and + non-generated slot.cc files. All non-inline implementation is now in + the .cc file. + * sigc++/functors/macros/slot.m4: Removed the code that has been moved + to slot_base.[h|cc]. + * sigc++/: Added signal_base.[h|cc] which contains non-template code + that was previously in the generated signal.h and non-generated + signal.cc file. All non-inline implementation is now in the .cc file. + * sigc++/macros/signal.m4: Removed the code that ahs been moved to + signal.cc + * sigc++/connector.[h|cc]: method implementation moved to the .cc file. + +1.9.14: + +2004-02-13 Martin Schulze + + * configure.ac: Bump version number to 1.9.14. + * NEWS: Add ChangeLog summary for version 1.9.14. + +2004-02-09 Murray Cumming + + * sigc++/functors/macros/slot.h.m4: slot_base: Added operator bool(), needed to + check for a slot that is created with the default constructor. This was + present in libsigc++ 1.2 also. + +2004-02-06 Murray Cumming + + * Makefile.am: Build the docs directory, by adding it to SUBDIRS. + * docs/Doxyfile.in: Updated to be more glibmm-like. + * Added some @deprecated doxygen bits. + * sigc++/macros/signal.h.m4: Call base constructor from signal_base + constructor - this is an error-as-warning when building gtkmm. + +1.9.13: + +2003-11-30 Martin Schulze + + * configure.ac: Bump version number to 1.9.13. + * NEWS: Add ChangeLog summary for version 1.9.13. + * Makefile.am, MSVC_Net2003/Makefile.am, configure.ac: + Distribute MS .Net project files. + * sigc++/adaptors/macros/[bind,hide].h.m4: Correct and add + documentation. Make hide_functor ctor explicit. + +2003-11-11 Martin Schulze + + * sigc++/adaptors/macros/[bind,hide].h.m4: Change to zero-based + argument index in numbered bind() and hide() overload + (Agreement on the mailing list). + Support binding up to CALL_SIZE arguments with one bind adaptor. + (Requested by joey yandle and others). + Only support binding of multiple arguments in unnumberd overloads + to keep the API simple (Requested by Murray Cumming). + * tests/test_[bind,hide,functor_trait].cc, sigc++/bind.h: + Reflect API changes in compatibility module and test cases. + +2003-11-10 Martin Schulze + + * sigc++/adaptors/macros/[bind,hide].h.m4: Add unnumbered + bind() and hide() overloads to make specifying the argument + position optional (Proposed by Jeff Franks). + * tests/test_[bind,hide].cc: Test unnumbered bind() and hide(). + * sigc++/adaptors/macros/adaptor_trait.h.m4: + Change "#ifdef MSVC" to "#ifdef _MSC_VER" (Roel Vanhout). + +2003-11-09 Martin Schulze + + * sigc++/functors/macros/slot.h.m4: Change functor type in + typed_slot_rep to adaptor_trait::adaptor_type + and use explicit function template instantiation in + internal::slot_call::call_it(). Avoids copying of arguments + in call_it() and enables binding of object instances + to class methods through bind() (Reported by Jeff Franks). + * tests/test_bind.cc: Test binding object instances to + class methods through bind(). + * sigc++/adaptors/adaptors.h: Include retype[_result].h. + * sigc++/adaptors/macros/adaptor_trait.h.m4: + - Add documentation. + - Mark some c-tors as explicit. + - Remove ununsed operator T_functor&() from adaptor_functor. + * sigc++/adaptors/macros/deduce_result_type.h.m4: + Rewrite parts of the documentation. + * sigc++/adaptors/macros/bind.h.m4: Add documentation. + * sigc++/functors/macros/mem_fun.h.m4: Remove unnecessary + explicit markers. Minor fixes to documentation. + * sigc++/functors/macros/functor_trait.h.m4: + Minor fixes to documentation. + +1.9.12: + +2003-11-04 Martin Schulze + + * configure.ac: Bump version number to 1.9.12. + * NEWS: Add ChangeLog summary for version 1.9.12. + +2003-11-03 Martin Schulze + + * sigc++/macros/signal.h.m4: Document accumulators. + Move slot_iterator_buf into namespace internal. Since + accumulators have the iterator type as a template argument + there is no need to expose this very internal type. + * sigc++/functors/macros/*.m4: Regroup documentation. + Documentation of the core parts of the library should be + complete by now. + +2003-11-02 Martin Schulze + + * Improve documentation of the core parts of the library. + * tests/test_ptr_fun.cc: Test ptr_fun() with static + member functions. + +2003-11-02 Martin Schulze + + * Move all .m4 files into new subdirectories + sigc++/[...]/macros. Install the .m4 files on + "make install" (Reported by Ron Steinke). + +2003-11-01 Martin Schulze + + * sigc++/[class,method,object]_slot.h.m4: Include + sigc++/functors/mem_fun.h (Reported by Ron Steinke). + +2003-11-01 Martin Schulze + + * sigc++/adaptors/lambda/operator.h.m4: Add negation + operator I have completely overlooked until now. + * sigc++/tests/test_lambda.cc: Test negation operator. + +2003-11-01 Martin Schulze + + * sigc++/[class_slot,method_slot,object_slot,hide].h.m4, + sigc++/signal.h.m4, sigc++/functors/mem_fun.h.m4: + - Use a shorter notation for ..._mem_function variants. + - Change order of mem_funcotr<>'s template arguments to + match std::mem_fun_t and to be more consistent with adaptors. + - Use ::sigc::slot's implicit ctor in compatibility module. + * sigc++/adaptors/lambda/operator.h.m4: Change some + lambda action names to match action names in std. + + API addition: + * sigc++/adaptors/retype.h.m4: New file adding + adaptor retype. + * sigc++/Makefile.am: Build and distribute new file. + * tests/test_retype.cc: New file testing adaptor retype. + * MSVC_Net2003/tests/test_retype/test_reytype.vcproj, + tests/Makefile.am: Build and distribute new test case. + +2003-11-01 Martin Schulze + + * MSVC_Net2003: New directory containing project + files for Visual Studio .Net 2003. + Credits to Roel Vanhout ! + +2003-11-01 Martin Schulze + + * sigc++/retype.h.m4: Use LIBSIGC_TEMPLATE_PREFIX + in explicit function template instantiations. + * sigc++/type_traits.h: Add template specialization + for arrays (T_type[N]) to disable non-working member + type_trait::instance(). + * sigc++/visit_each.h: Remove more disturbing + limit_derived_target<>::operator() overloads. + (Should have noticed earlier that they are unnecessary.) + * sigc++/adaptors/deduce_result_type.h.m4, + sigc++/adaptors/lambda/operator.h.m4, + sigc++/functors/functor_trait.h.m4, + tests/test_[bind,compose,exception_catch,hide,lambda].cc: + Completely removed support for typeof(). We don't need + it any more and it is completely non-standard! + +2003-10-30 Cedric Gustin + + * configure.ac: Added test of win32 platform. Commented + out AM_DISABLE_SHARED (DLLs are shared libraries). + * sigc++/Makefile.am: added a few LDFLAGS for win32 + DLLs. + +2003-10-30 Martin Schulze + + * sigc++/signal.h.m4: Add SigC::Signal#<>::slot(). + * sigc++/slot.h.m4: Comment out make_slot() work-around. + * sigc++/adaptors/bind.h.m4: Remove unnecessary brackets + in template argument lists. They are confusing MSVC. + * sigc++/adaptors/*.h.m4, sigc++/adaptors/lambda/*.h.m4: + Use LIBSIGC_TEMPLATE_PREFIX in explicit function + template instantiations. + * sigc++/tests/test_*.cc: + - Include where std::string is used. + - Use double instead of float. + +2003-10-27 Martin Schulze + + * sigc++/retype.h.m4: Cleanup. + * TODO: Bring it up to date. + +1.9.11: + +2003-10-26 Martin Schulze + + * configure.ac: Bump version number to 1.9.11. + * NEWS: Add ChangeLog summary for version 1.9.11. + +2003-10-26 Martin Schulze + + Compatiblity module: + * sigc++/signal.h.m4: Move definition of compatiblity + classes SigC::SignalN to here. + * sigc++/connection.h: + - Add connection::connected(). + - Add compatibility typedef SigC::Connection. + * sigc++/bind.h, sigc++/bind_return.h, + sigc++/class_slot.h.m4, sigc++/hide.h.m4, + sigc++/method_slot.h.m4, sigc++/object.h, + sigc++/object_slot.h.m4, sigc++/retype.h.m4, + sigc++/retype_return.h sigc++/slot.h.m4, + sigc++/compatibility.h: + New files to complete compatibility module. + Split content of compatibility.h.m4 among the new files. + * sigc++/compatibility.h.m4: Removed. + * Makefile.am: Build and distribute new files. + * tests/test_compatibility.cc: Test new stuff. + + Fixes: + * sigc++/functors/slot.h.m4: Fix copy constructor and + operator=() of slot template. + * sigc++/adaptors/bind.h.m4: Fix deduce_result_type + template specializations. bind<0>() probably compiles + with gcc-3.3, now. + +2003-10-26 Martin Schulze + + Fixes: + * sigc++/functors/slot.{cc,h.m4}: + - Fix notification process: don't defer detaching of a + slot from all referred trackables during signal emission! + - Size optimization: replace virtual functions from + struct typed_slot_rep with function pointers in slot_rep + (reduces size of a typical typed_slot_rep instantiation + by 30% !!!). + * tests/test_slot.cc: Test sigc::slot more thoroughly. + * sigc++/functors/mem_fun.h.m4: Fix visit_each(). + * sigc++/adaptos/bind_return.h.m4: Add support for + sigc::ref(). + * tests/test_bind_return.cc: Use sigc::ref(). + * sigc++/signal.h.m4: Avoid compiler warning about + uninitialized variable r_ in emit(). + * sigc++/visit_each.h: Cleanup. + + API additions: + * sigc++/adpators/lambda/operators.h.m4: Add + lambda actions sigc::{reinterpret,static,dynamic}_cast_ + to support explicit parameter conversion. + * tests/test_lambda.cc: Test sigc::static_cast_. + * sigc++/adaptors/retype_return.h.m4: New file adding + adaptor retype_return (and hide_return). + * sigc++/Makefile.am: Build and distribute new file. + * tests/test_retype_return.cc: New file testing + adaptor retype_return (and hide_return). + * tests/Makefile.am: Build and distribute new test case. + +2003-10-25 Martin Schulze + + * sigc++/visit_each.h: Remove disturbing + limit_derived_target<>::operator() overloads. + * sigc++/adaptors/bind.h.m4: Add support for sigc::ref(). + * tests/test_bind.cc: Test sigc::ref(). + * sigc++/adaptors/lambda/{operator,group,base}.h.m4: + - Move support for sigc::ref() from lambda_core<> into + lambda operator and lambda group creator functions. + - Add missing visit_each() overload for lambda<> template. + * tests/test_lambda.cc: Test auto-disconnection. + TODO: Fix a strange bug that leads to "Bus error" + during auto-disconnection. + +1.9.10: + +2003-10-23 Martin Schulze + + * configure.ac: Bump version number to 1.9.10. + * NEWS: Add ChangeLog summary for version 1.9.10. + +2003-10-23 Martin Schulze + + * sigc++/functors/{functor_trait,slot}.h.m4: + Move definition of struct nil into functor_trait.h. + +2003-10-23 Martin Schulze + + * configure.ac: Disable typeof() compiler checks. + * sigc++/adaptors/bind.h.m4: Remove unnecessary + deduce_result_type<> template specializations. + +2003-10-20 Martin Schulze + + * sigc++/adaptors/compose.h.m4: + Correct order of typedefs for good. (Patch from Jeff Franks.) + +1.9.9: + +2003-10-20 Martin Schulze + + * sigc++/connection.h: Add constructor that takes + a sigc::slot_base& to support 3rd-party slot lists + like they are used in glibmm/gtkmm. + * sigc++/functors/slot.h.m4: Make sigc::slot::call_type public. + (Fixes compile problems reported by Jeff Franks.) + * sig++/type_traits.h: Don't use long long in + sigc::is_base_and_derived. + (Fixes compile problems reported by Jeff Franks.) + * sigc++/adaptors/{bind,compose,hide,exception_catch}.h.m4: + Correct order of typedefs. (Repoted by Jeff Franks.) + * configure.ac: Bump version number to 1.9.9. + * NEWS: Add ChangeLog summary for version 1.9.9. + +1.9.8: + +2003-10-19 Martin Schulze + + * sigc++/functors/slot.h.m4: Define doxygen group functors. + * configure.ac: Bump version number to 1.9.8. + * NEWS: Add ChangeLog summary for version 1.9.8. + +2003-10-19 Martin Schulze + + * NEWS: Add announces of versions 1.9.6 and 1.9.7. + * sigc++/compatibility.h.m4: New file. Defines namespace SigC. + namespace SigC should be API compatible to libsigc++-1.2. + * sigc++/Makefile.am: Build compatibility.h. + * tests/test_compatibility.cc, tests/Makefile.am: + Add test case for compatibility module. + * docs/index.html: Change group names. + * sigc++/sigc++.h: Include connection.h. + * sigc++/connection.{cc,h}: + - Rename dependency to destroy_notify_callback. + - Change parameter name in set_slot() from d to data. + - Fix operator=(): Add "return *this;" + - Get rid of namespace functor. + - Corrections in documentation. + * sigc++/signal.{cc,h.m4}: + - Add reference counter to signal_impl. Replaces "bool destroy_". + - Move signal_base, slot_iterator[_buf], slot_list out of + namespace internal. They are part of the public API. + - Add convenience function signal#::make_slot(). + - Get rid of namespace functor. + - Corrections in documentation. + * sigc++/trackable.{cc,h}: + - Rename dependency to destroy_notify_callback. + - Rename trackable::clear() to trackable::notify_callbacks(). + - Corrections in documentation. + * sigc++/type_traits.h: Add documentation. + * sigc++/visit_each.h: + - Get rid of namespace functor. + - Add documentation. + * sigc++/adaptors[/lambda]/*: Get rid of namespace functor. + * sigc++/functors/{functor_trait.h,ptr_fun.h.m4,mem_fun.h.m4}: + - Get rid of namespace functor. + - Corrections in documentation / add documentation. + * sigc++/functors/slot.{cc,h.m4}: + - Move slot_base out of namespace internal. It's public API. + - Get rid of one-letter-parameter-names. + - Get rid of namespace functor. + - Corrections in documentation. + * tests/*.cc: Get rid of "using namespace ...". + +2003-09-10 Martin Schulze + + * sigc++/adaptors/lambda/{base,operators}.h.m4: + Add subscript ([]) and assign (=) operator. I think there are now + enough operators available to make any future power user happy. + The only one missing is the comma operator and if we added it + the logical consequence would be to also add if(), switch(), do(), + etc. lambda expressions which are really out of place in libsigc++. + * sigc++/type_traits.h: Fix is_base_and_derived<> for const types. + * tests/test_lambda.cc: Test new operators. + +1.9.7: + +2003-09-05 Martin Schulze + + * configure.ac: Bump version number to 1.9.7. + +2003-09-03 Martin Schulze + + * sigc++/adaptors/lambda/operator.h.m4: + - Restructure so that the size of the generated source file stays + reasonable for 34 operators: There are only two lambda templates + lambda_operator and lambda_operator_unary. The action is an additional + template parameter. A small template lambda_action[_unary] is specialized + for all actions. + - Add most operators that boost::lambda supports. Missing operators are + "=", "[]", "," and support for pointer arithmetic. I don't know if it's + worth adding these. In libsigc++, the purpose of lambda operators is to + provide some extra functionality for the group adaptor. + * tests/test_lambda.cc: + Test pre-increment, address and dereference operator. + +2003-08-31 Martin Schulze + + * sigc++/reference_wrapper.h, sigc++/type_traits.h, sigc++/Makefile.am: + New file reference_wrapper.h provides ref() to specify that adaptors/lambdas + should take a reference to the object passed into ref() instead of a copy. + * tests/test_lambda.cc: + - Test group() with mem_fun(). + - Use ref() where lambdas should store references to objects. + - Test var() and constant(). + * sigc++/adaptors/lambda/base.h.m4: + - Support ref() in return type deduction. + - Add var() and constant() which create lambdas for usage with lambda operators. + * sigc++/adaptors/lambda/operator.h.m4: + - Fix return type deduction. + - Remove operator{+,-,*,...} overloads added on 2003-08-29. ref() is way cleaner. + * sigc++/adaptors/lambda/group.h.m4, + sigc++/adaptors/bind.h.m4, sigc++/adaptors/compose.h.m4, + sigc++/adaptors/exception_catch.h.m4, sigc++/adaptors/hide.h.m4: + Fix return type deduction. + +2003-08-29 Martin Schulze + + * tests/test_lambda.cc: Add more tests. + * sigc++/adaptors/lambda/select.h.m4, sigc++/adaptors/lambda/lambda.cc.m4: + Make _1, _2, ... constant. + * sigc++/adaptors/lambda/operator.h.m4: + Add operator{+,-,*,...} overloads to distinguish between const and non-const objects. + Store references to non-const objects rather than copies. + This allows expressions like e.g. std::cout << _1. + * sigc++/adaptors/lambda/base.h.m4, sigc++/adaptors/lambda/group.h.m4: + Remove void specializations. Functors returning void are tested and work fine. + +2003-08-27 Martin Schulze + + * tests/test_callof.cc, tests/test_deduce_result_type.cc: + Rename, correct and improve this test case. + * tests/Makefile.am: Build and run test_deduce_result_type + instead of test_callof. + +2003-08-27 Martin Schulze + + * Update TODO. + +2003-08-27 Martin Schulze + + * sigc++/adaptors/hide.h.m4: Remove usage of callof_ignore_arg<>. + * sigc++/callof.h.m4, sigc++/adaptors/deduce_result_type.h.m4, + sigc++/functors/functor_trait.h.m4: + Remove the first and move deduce_result_type templates from + functor_trait.h.m4 into new file deduce_result_type.h.m4. + * sigc++/Makefile.am, sigc++/sigc++.h, sigc++/adaptors/adaptor_trait.h.m4: + Build and include sigc++/adaptors/deduce_result_type.h instead of callof.h. + * sigc++/functors/slot.h.m4: Document struct nil. + +2003-08-24 Martin Schulze + + * sigc++/functors/functor_trait.h.m4: Simplify usage of convenience + macro SIGC_FUNCTORS_HAVE_RESULT_TYPE: + namespace sigc{ namespace functor{ SIGC_FUNCTORS_HAVE_RESULT_TYPE }} + +2003-08-24 Martin Schulze + + * sigc++/functors/functor_trait.h,m4, sigc++/adaptors[/lambda]/*.h.m4: + Merge adaptor return type deduction and typeof() into + sigc::functor::deduce_result_type. Use it for all adaptors. + * tests/test_compose.cc: Only test multi-type get-functor if + typeof() if supported. + +2003-08-24 Martin Schulze + + * sigc++/adaptors[/lambda]/*.h.m4: + - Remove unnecessary void specializations. In fact, only the one + for sigc::functor::exception_catch<> is needed and I don't really + understand why. For the lambda stuff the void specializatoins are + just commented out at the moment. + - Make typeof() optional. Surprisingly, I got the lambda stuff working + without typeof()! The test suite doesn't catch all cases yet, so maybe + some thing are still not working. + TODO: Implement configure check. + * tests/test_bind.cc, tests/test_compose.cc tests/test_exception_catch.cc, + tests/test_hide.cc, tests/test_lambda.cc: + Only test multiple functor return types if typeof() is supported. + +2003-08-06 Martin Schulze + + * sigc++/trackable.{cc,h}: Add function trackable::clear(). + +2003-06-24 Andreas Rottmann + + * TODO: Minor tweaks. + +2003-06-23 Andreas Rottmann + + * docs/reference/Doxyfile.in: Use these variables. + * docs/reference/Makefile.am (html/index.html): Provide doxygen + with SRCDIR and TOP_SRCDIR environment variables. + + * sigc++/functors/slot.h.m4: Make slot::call_type typedef public; + this fixes a g++ 3.3 error in signal.h. + + * sigc++/signal.h.m4: Make the signal::accumulated class public; + this fixes a g++ 3.3 error in test_accumulated.cc. + +2003-06-15 Martin Schulze + + * sigc++/functor/slot.h.m4: Correct typing error in docs. + * sigc++/functor/ptr_fun.h.m4: Document the whole thing. + +2003-05-31 Murray Cumming + + * Reference documentation: Rearranged the groups to make it all + a bit more like the libsigc++ 1.2 reference documentation. + Corrected some spelling and grammar too. + This needs a lot of work. The text is very hard to read and it's + generally not appropriate for a user of the code who doesn't + care about the internals. But it's not impossible - our examples + should show us what we need to say in the documentation. + We probably need some more groups for the extra stuff, like we do + in libsigc++ 1.2. + +2003-05-29 Martin Schulze + + * sigc++/signal.h.m4: Fix documentation. + * sigc++/connection.h, sigc++/functor/slot.h.m4: + Document the whole thing. + +2003-05-29 Martin Schulze + + * sigc++/signal.h.m4: + - Remove bogus operator() from unnumbered signal<> and + signal<>::accumulated templates. + - Document the whole thing. + + * docs/index.html: Fix some links. + +2003-04-06 Martin Schulze + + * TODO, configure.ac, Makefile.am, docs/*: + Add Doxygen framework. + +2003-04-06 Martin Schulze + + * sigc++/callof.h.m4, sigc++/adaptors/*, tests/test_callof.cc: + Move sigc::callof<> to sigc::functor::internal::callof<>. + + * sigc++/functors/mem_fun.h.m4, tests/test_mem_fun.cc: + Add new types [bound_][const_]volatile_mem_functor, visit_each() + and mem_fun() overloads for volatile qualifier. + Add ctor overloads in bound_*mem_functor and mem_fun() overloads + that take reference instead of pointer. + +2003-03-26 Martin Schulze + + * Change "closure" to "slot" throughout sigc++2 (file names, + class names, member variables, documentation, etc.). + +2003-03-26 Martin Schulze + + * TODO: Rewrite to reflect recent changes as well as recent discussions. + +2003-03-24 Martin Schulze + + * sigc++/adaptors/bind_return.h.m4: Make the adaptor's data member + public so that visit_each() can access it. + + * sigc++/adaptors/lambda/*.h.m4: More fixes. Add a note about + malfunctioning typeof() (probably compiler bug in gcc-3.2). + + * tests/*.cc: Test references. Fix compose equivalent in test_lambda. + +2003-03-24 Martin Schulze + + * sigc++/Makefile.am, sigc++/functors/functor_trait.h[.m4], + sigc++/adaptors/adaptor_trait.h.m4: Move detection of function + and member method pointers' return types from adaptor_trait into + functor_trait. (We'll use functor_trait rather than adaptor_trait for + our lambda stuff.) functor_trait.h needs to be generated from .m4 now. + + * sigc++/functors/functor_trait.h.m4: Add convenience macros: + - SIGC_FUNCTORS_HAVE_RESULT_TYPE indicates that the existance of + T_functor::result_type should be assumed for all unknown functors. + - SIGC_FUNCTOR_TRAIT(T_functor, T_result) explicitly specifies the + result type of a functor. + ("typename functor_trait::result_type") is used to + determine the return type of our adaptors' operator()() overloads. + + * sigc++/adaptors/[lambda/]*.h.m4: Various fixes in visit_each() and + operator()() overloads to make these operator()() overloads usable. + Most of them were just commented out before. Some adaptor types also + have void specializations, now. + + * sigc++/adaptors/lambda/group.h.m4: Change syntax from + "[some_functor] % grp([args])" to "group([some_functor], [args])" + like we agreed on the ml some time ago. + + * sigc++/tests/test_[all adaptors].cc: Test stuff that didn't work + before. + +2003-03-22 Murray Cumming + + * Added pgk-config file, from a mystery person in bug #108857 + +2003-03-22 Martin Schulze + + * tests/test_bind.cc: Test and show how to use functor_trait + for user defined or 3rd-party functors so that a + bind<0>([functor],[arg1])() call with no arguments can return a value. + +2003-03-20 Martin Schulze + + * sigc++/callof.h.m4: Add explanations. Comment in / create templates + callof_safe[#]. Unfortunately they don't work for functors with overloaded + operator() so we don't use it for now. At least everything is documented. + + * sigc++/functors/functor_trait.h, sigc++/functors/*.h.m4: Add back + functor_base compiler hint. We're using it now in adaptor_functor<>. + + * sigc++/adaptors/{adaptor_trait,bind}.h.m4: Make operator() overloads + with no arguments return the result of the functor invocation. + Fix multiple bind<0>(). + * tests/test_bind.cc: Test the stuff that's working now. + +2003-03-16 Murray Cumming + + * Added sigc++/sigc++.h, like in libsigc++ 1.2 + * examples: Added member_method example, which uses a class method + and which demonstrates disconnection. + +1.9.6: + +2003-03-11 Andreas Rottmann + + * sigc++/Makefile.am: Use substitution references instead of + $(patsubst). Is shorter and fixes the strange-dirs-in-dist-tarball + bug. + +2003-03-09 Martin Schulze + + * sigc++/connection.h: Add block() capability. + +2003-03-09 Martin Schulze + + * sigc++/signal.{cc,h.m4}: Add flag signal_impl::destroy_ + and function signal_impl::destroy(). Use them to defer + the destruction of the signal_impl object during signal + emission. + + * tests/test_disconnect.cc: Add tests for the connection + class and for deleting signals during emission. + +2003-03-09 Martin Schulze + + * sigc++/connection.{cc,h}, sigc++/Makefile.am: + - New files that add a connection class. Objects of this + class are constructed from closure list iterators and can + be used to disconnect the refered closure. As opposed to + iterators they stay valid beyond the lifetime of the closure. + +2003-03-09 Martin Schulze + + * sigc++/functors/closure.{cc,h.m4}, sigc++/signal.cc: + - Rename closure_{base,rep}::[set_]dependency_ -> [set_]parent_. + - Make closure_rep inherit trackable. This allows for + connection objects that stay valid beyond the life time + of the refered closure. + - Make some one-line-functions inline again. + +2003-03-08 Martin Schulze + + * sigc++/trackable.cc: BUGFIX in trackable_dep_list::clear() + +2003-03-08 Andreas Rottmann + + * sigc++/Makefile.am: Rewritten so we can build lambda cleanly. + * sigc++/Makefile.am_fragment: Removed. + + * sigc++/functors/Makfile.am: Removed. + * sigc++/adaptors/Makefile.am: Removed. + * sigc++/adaptors/lambda/Makefile.am: Removed. + * configure.ac (AC_OUTPUT): Remove the above Makefiles. + + * tests/Makefile.am: Re-included lambda test. + +2003-03-07 Martin Schulze + + * sigc++/signal.{cc,h.m4}: + - signal_emit#<>: New templates replacing signal#<>::caller. + The purpose of these templates is implementing the emit + function and optimizing signal emission for the case that + no accumulator is used via template specializations. + - default_accumulator<>: Removed. The default for T_accumulator + in signal#<> now is nil. An example how to use accumulators + is available in tests/test_accumulator.cc. + - signal_{base,impl}: Move the implementation of signal_base's + interface to signal_impl. An object of this class is + dynamically allocated when first connecting a closure to + the signal. This drastically reduces the size of empty signals + and allows for future addition of a reference counter to make + it safe to delete a signal during emission. + - Directly work on closure_rep during signal emission. This + seems to be quicker than using the closure templates. + - Document the classes. Restructure the header file a bit. + + * sigc++/functors/closure.h.m4: Make closure_base::rep_ data + member public, so that signal emission can directly work on it. + + * tests/test_size.cc: Add an entry for signal_impl. + +2003-03-07 Martin Schulze + + * sigc++/functors/closure.{cc,h.m4}: + - closure_base: BUGFIXES in ~closure_base() and operator=(). + - Mark some functions with the inline keyword. This seems to + help gcc 3.2 to optimize signal emission and (dis)connection. + - Document the classes. Restructure the header file a bit. + +2003-03-07 Martin Schulze + + * sigc++/trackable.{cc,h}: Make trackable allocate a + trackable_dep_list object dynamically when adding the first + dependency. (This reduces the size of objects, that are not + refered by a closure by 4 bytes (50%) and increases the size + of objects that are refered by a closure by 4 bytes (50%) + on a 32 bit architecture => This reduces total memory use + when >50% of the trackables are not refered by a closure.) + Document the classes. + +2003-03-05 Martin Schulze + + * tests/Makefile.am, tests/test_size.cc, tests/test_accumulated.cc: + Add two test cases. test_size is showing the size of public and + internal structures. (Which apart from empty signals are smaller + than the sizes of the equivalent libsigc++-1.2 structures.) + test_accumulated is a test for the template signal<>::accumulated<> + at the same time showing the use of accumulators in libsigc++2. + + * Offtopic: My note about binary sizes from 2003-02-10 is wrong. + Stripped libsigc++2 test binaries are about 8-10k in size. + +2003-03-05 Martin Schulze + + * sigc++/visit_each.h: BUGFIX in template specialization + limit_derive_target::with_type: + Add non-const overloads for static void execute_() avoiding + compile time errors. + +2003-02-16 Martin Schulze + + * tests/Makefile.am, tests/test_disconnect.cc: + Add testcase with a mixed connection & disconnection sequence. + +2003-02-16 Martin Schulze + + * sigc++/signal.cc: Bugfix in signal_base::insert(): + Set notification function in the newly created copy of + slot_ rather than in slot_ itself. + +2003-02-10 Martin Schulze + + * sigc++/signal.h.m4: Comment in typedefs for iterator types in + the signal#<> class template. Make signal#<>::connect() return an + iterator for convenience. + (Note that the first change increases the binary size of + tests/test_signal from 201k to 204k, the second change to 206k.) + +2003-01-23 Murray Cumming + + * sigc++/adaptors/lambda is disable temporarily (not built and + not distributed) because it gets built before its parent + directory, but #includes generated sources in the parent directory. + +2003-01-22 Murray Cumming + + * Added Andreas Rottman's example. + +2003-01-22 Murray Cumming + + * Applied Andreas Rottman's make dist fixes. + +2003-01-14 Murray Cumming + + * Added whitespace to make the code more readable. + diff --git a/libs/sigc++2/INSTALL b/libs/sigc++2/INSTALL new file mode 100644 index 0000000000..a4b34144dc --- /dev/null +++ b/libs/sigc++2/INSTALL @@ -0,0 +1,229 @@ +Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/libs/sigc++2/Makefile.am b/libs/sigc++2/Makefile.am new file mode 100644 index 0000000000..50d6e4b3b6 --- /dev/null +++ b/libs/sigc++2/Makefile.am @@ -0,0 +1,18 @@ + +# it includes all the autostuff automatically, you just name the +# other stuff here +EXTRA_DIST = autogen.sh sigc++config.h.in libsigc++-2.0.spec.in +# ACLOCAL_FLAGS = -I scripts + +SUBDIRS = sigc++ scripts +DIST_SUBDIRS = $(SUBDIRS) + +sigc_configdir = $(libdir)/sigc++-2.0/include +sigc_config_DATA = sigc++config.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = sigc++-2.0.pc + +all-local: + @echo "*** Everything completed ***" + diff --git a/libs/sigc++2/Makefile.in b/libs/sigc++2/Makefile.in new file mode 100644 index 0000000000..216991455e --- /dev/null +++ b/libs/sigc++2/Makefile.in @@ -0,0 +1,711 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/libsigc++-2.0.spec.in \ + $(srcdir)/sigc++-2.0.pc.in $(srcdir)/sigc++config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO config.guess config.sub depcomp install-sh ltmain.sh \ + missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/scripts/cxx.m4 \ + $(top_srcdir)/scripts/cxx_std.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = sigc++config.h +CONFIG_CLEAN_FILES = sigc++-2.0.pc libsigc++-2.0.spec +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(sigc_configdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +sigc_configDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) $(sigc_config_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FP_MAJOR_VERSION = @FP_MAJOR_VERSION@ +FP_MICRO_VERSION = @FP_MICRO_VERSION@ +FP_MINOR_VERSION = @FP_MINOR_VERSION@ +FP_RELEASE = @FP_RELEASE@ +FP_VERSION = @FP_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL_PATH = @PERL_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# it includes all the autostuff automatically, you just name the +# other stuff here +EXTRA_DIST = autogen.sh sigc++config.h.in libsigc++-2.0.spec.in +# ACLOCAL_FLAGS = -I scripts +SUBDIRS = sigc++ scripts +DIST_SUBDIRS = $(SUBDIRS) +sigc_configdir = $(libdir)/sigc++-2.0/include +sigc_config_DATA = sigc++config.h +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = sigc++-2.0.pc +all: sigc++config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +sigc++config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/sigc++config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status sigc++config.h +$(srcdir)/sigc++config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f sigc++config.h stamp-h1 +sigc++-2.0.pc: $(top_builddir)/config.status $(srcdir)/sigc++-2.0.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libsigc++-2.0.spec: $(top_builddir)/config.status $(srcdir)/libsigc++-2.0.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-sigc_configDATA: $(sigc_config_DATA) + @$(NORMAL_INSTALL) + test -z "$(sigc_configdir)" || $(MKDIR_P) "$(DESTDIR)$(sigc_configdir)" + @list='$(sigc_config_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sigc_configDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sigc_configdir)/$$f'"; \ + $(sigc_configDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sigc_configdir)/$$f"; \ + done + +uninstall-sigc_configDATA: + @$(NORMAL_UNINSTALL) + @list='$(sigc_config_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sigc_configdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sigc_configdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) sigc++config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) sigc++config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) sigc++config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) sigc++config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) sigc++config.h all-local +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sigc_configdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA install-sigc_configDATA + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgconfigDATA uninstall-sigc_configDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am all-local am--refresh check check-am clean \ + clean-generic clean-libtool ctags ctags-recursive dist \ + dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-sigc_configDATA install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA uninstall-sigc_configDATA + + +all-local: + @echo "*** Everything completed ***" +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libs/sigc++2/NEWS b/libs/sigc++2/NEWS new file mode 100644 index 0000000000..dbe2201356 --- /dev/null +++ b/libs/sigc++2/NEWS @@ -0,0 +1,354 @@ +2.2.2 (stable) + +* Added an include of functors/slot.h that was mistakenly removed + during the 2.1 series. + (Deng Xiyue) Bug #521418. + +2.2.1 (stable): + +* Really fix the build with Sun CC. + (Elaine Xiong. Bug #302098) + +2.2.0 (stable): + +* Build fixes when using gcc 4.3 pre-releases. + (Ryan Hill, Vladimir Marek) + +2.1.1 (unstable): + +WARNING: This is an unstable release and should not yet be +packaged by distributions unless libsigc++ 2.0.x does not +build for some reason (Please report such bugs). + +* Removed the SigC:: namespace and other compatibility API, + to fix the build with some versions of some compilers, + such as the SUN Forte C++ CC compiler. + See bug #302098, for instance + (Murray Cumming) +* sigc::signal<>: + - Added Added typedefs for + value_type, reference, and pointer, so that these + iterators are more like standard C++ iterators, so they can + be used with standard C++ algorithms. + (Michael Elkstrand) (Bug #417926). + - Added emit_reverse(). + (John Profic) + +2.0.17: + +* slot::disconnect(): Make this work. + sigc::connection::disconnect() already worked. + (James Lin, Murray Cumming) +* visit_each compilation problem fixed. + (Philipp Berndt) + +2.0.16: + +* Fixed build for SUN Forte C++ 5.5 +* Fixed build for MSVC++ 7.1 +* Fixed crash when using --no-inline with g++. + +2.0.15: + +* g++ 3.2 (and Mac OS X g++ 3.3) build fix. + (Paul Pogonyshev) +* Compose: Fix slot lifetime regression introduced in + 2.0.9. (Philip Langdale) +* tests: Small ISO C++ correctness fix (Marek Rouchal) +* Don't specify unused function parameter names. + (Andris Pavenis) + +2.0.14: + +* SUN Forte 5.7 build fix for ambiguity when using + inner template class. However, you still need the + patch in bug #302098 to finish the build. + +2.0.13: + +* signal_emit::emit(): Ensure the correct order of + destruction of the member variables, to avoid a leak. + (Andreas Ames, bug #306249) +* Allow recursive signal emission again. + (Neal E. Coombes, bug #303896) +* SUN Forte CC 5.5 build fixes: + - test_compatibility minor fix. + - visit_each() template specializations: + Mention the bool I_derives_trackable template type, + (Friedemann Kleint, bug #305647) + - Check for the non-standard SUN reverse_iterator, + and use alternative code if necessary. + (Murray Cumming) + +2.0.12: + +* Fixes crashes when using virtual inheritance, particularly + with bound by-reference parameters, caused by casting + from derived to base when the derived destructor has run. + (Régis Duchesne) + This might affect non-g++ compilers, so do tell us about + any problems. + +2.0.11: + +* Build fixes for SUN Forte, Tru64 + (Murray Cumming), and MSVC++ (Cedric Gustin). + +2.0.10: + +* tests: Include to avoid unresolved symbols on Tru64. + (Tim Mooney) +* When signal handlers are connected made during an emit + of the same signal, prevent them from being called in the + same emit, to prevent infinite loops. + (Neal E. Coombes) +* Performance improvement in a corner case. + (Neal E. Coombes). + +2.0.9: + +* sigc::bind() now works with the AIX and Tru64 compilers. + See the comments in sigc++/visit_each.h: visit_each_type() + if you have compilation problems. + (Murray Cumming) +* sigc::var() is now documented. (Roger Ferrer Ibáñez) + +2.0.8: + +* Maybe avoid (incorrect) warning with g++ 3.3.5. + (Murray Cumming) +* Fix namespace ambiguity when using multiple + major versions of libsigc++. (Liza Klerck) + +2.0.7: + +* Now builds with the following compilers, in addition to +the existing GNU g++, SUN Forte CC 5.5, MSVC++ .Net 2003, +and Intel compilers: +- IBM AIX xlC v7 +- Tru64 C++ V6.5-042 +- IRIX MIPSpro 7.4.2m + (Older versions of all these compilers might also work.) + (Murray Cumming, www.thewrittenword.com) +* MSVC++ .Net 2003 build improvements. + (Cedric Gustin, Timothy M. Shead) +* Replace C-style casts with reinterpret_cast<> and + static_cast<>. (e97_far at e.kth.se). +* Documentation: Added manual, based on the manual in + libsigc++ 1.2, but updated for the new API. + (Murray Cumming) + + +2.0.6: + +* Fixed a memory leak in sigc::slot. +* Fixed compilation for gcc-3.4. +* Fixed compilation for Intel C++ compiler (upgraded libtool). +* Fixed project files for MSVC .Net (Timothy M. Shead). +* Fixed segfaults when compiled with MSVC .Net 2003 (moved + all calls to new and delete into non-inline library code). +* In the compatibility module use correct bound_mem_functor + variants for const (volatile) methods when creating a slot. +* Minor documentation fix. +* Resolved bugs: #152327 #148744 #152323 #151404 #153143 + +2.0.5: + +* Distribute pregenerated configuration header for MSVC .Net. + +2.0.4: + +* Fixed warnings and compiler errors in the test cases. +* Added a new test case (Murray Cumming). +* Fixed 'hello_world' example. +* Don't test optional features that fail with the Sun FORTE. +* Fixes for the Sun FORTE to compile out-of-the-box + (Damien Carbery, Murray Cumming, Martin Schulze). +* Fixes for MSVC to build a DLL out-of-the-box (James Lin). +* Improved compiler specific configuration during 'configure'. +* Added rmp description file libsigc++-2.0.spec (Eric Bourque). +* Minor documentation improvements (Murray Cumming). +* Resolved bugs: #147311 #147313 #147391 #144846 #145541 + +2.0.3: + +* Fix segfault on emission of unconnected signal. +* Test emission of unconnected signals in the test case. +* Suppress compiler warning at dynamic_cast<>-test for good. + (Help from Christof Petig and Timothy M. Shead.) + +2.0.2: + +* Suppress compiler warning in compatibility module at + dynamic_cast<>-test (fix suggested by Timothy M. Shead). +* If a custom accumulator is specified invoke it on signal + emission even if the signal's slot list is empty. (This used + to be the case in libsigc++-1.2 as pointed out by Timothy.) + +2.0.1: + +* Fixed serious bug in reference counting in sigc::signal_base::impl(). +* Fixed SigC::Object-derivation check in SigC::slot() compatibility module. +* Fixed compilation on Apple gcc 3.3 (assisted by Spundun Bhatt). +* Fixed configure check for gcc 3.4 (Murray Cumming). + +2.0.0: + +* Implemented sigc::connection::blocked() (Murray Cumming). +* Added the scripts directory to the make dist target (Murray Cumming). +* Added more documentation (Martin Schulze). + +1.9.16: + +* Fixed compiler warning in sigc::connection (Alexander Nedotsukov, Murray Cumming). +* Fixed examples and made them part of the regular build (Murray Cumming). +* Added header sigc++config.h for configure time checks (Murray Cumming). +* Added configure time checks to determine the correct syntax + for explicit template method specializations (Murray Cumming). +* Removed code using partial specializations of overloaded template methods + from test cases. SUN Forte doesn't support this feature (Martin Schulze). +* Fixed compilation for gcc 3.4 (Murray Cumming). + +1.9.15: + +API additions: +* Add numbered slot# templates. +* Allow for methods of the object's base types to be passed into sigc::mem_fun(). + +Other fixes and cleanups: +* Make is_base_and_derived template compatible with the SUN Forte. +* Non-template code moved from .m4 macro source to .h/.cc files (Murray Cumming). +* Implementation moved to .cc files (Murray Cumming). +* More fixes for the SUN Forte. Make some more ctors explicit. + +1.9.14: + +* Added sigc::slot_base::operator bool() (Murray Cumming). +* Build docs directory by default (Murray Cumming). +* Fixed minor doxygen issues (Murray Cumming). +* Fixed compiler warning in signal.h (Murray Cumming). + +1.9.13: + +* Fixed passing references through sigc::slot (Reported by Jeff Franks). +* Enabled binding of objects to method slots through sigc::bind(). +* Reworked sigc::bind() API: Made the template argument for the + parameter position zero-based and optional. Added overloads for + binding of up to 7 arguments at a time when no position is specified. +* Reworked sigc::hide() API: Made the template argument for the + parameter position zero-based and optional. +* Fixed compilation problems with MSVC .Net 2003 (Roel Vanhout). +* Distribute MSVC .Net 2003 project files in the tarballs. +* Improved and extended documentation. +* Minor cleanups. + +1.9.12: + +* Added adaptor retype(). With this final API addition all adaptors + are in place that are available in libsigc++-1.2. +* Added negation lambda operator. Use STL names for lambda actions. +* Remove formerly disabled support for gcc extension typeof(). +* Added project files for MS Visual Studio .Net 2003. (Roel Vanhout) +* Make libsigc++2 compile with .Net 2003. (Roel Vanhout, Martin Schulze) +* Build shared version of libsigc++2 by default. (Cedric Gustin) +* Add support for win32 platform. (Cedric Gustin) +* Install .m4 files. (requested by Ron Steinke) +* Cleaned up functors. +* Restructured and completed documentation of the core library parts. + +1.9.11: + +API Additions and important bug fixes: +* Compatibility module completed. libsigc++-1.2 filenames are preserved. +* Fixed critical bug in auto-disconnection: don't defer detaching + of a slot from all referred trackables during signal emission. +* Reduced size of slots significantly. +* Fixed support for sigc::ref() in adaptors. +* Fixed sigc::visit_each(): only hit targets that are passed by + reference; pass bound members in bound_member_functor by reference. +* Add lambda actions sigc::{reinterpret,static,dynamic}_cast_ + to support explicit parameter conversion. +* Add adaptors sigc::retype_return<>() and sigc::hide_return(). + +Minor fixes: +* Fixed return type deduction for bind<0>. + libsigc++-1.9.11 should compile with gcc-3.3. +* Fixed copy constructor and operator=() of slot template. +* Fixed a compiler warning in signal_emit#<>::emit(). +* Improved test case. + +1.9.10: + +* Fix compiler issues with gcc-3.3.2 (patch from Jeff Franks). +* Remove compiler check for the gcc extension typeof(). +* Simplify bind_functor templates. +* Move definition of struct nil into functor_trait.h. + +1.9.9: + +* Add a constructor to sigc::connection that takes a slot_base& + to support user defined slot lists like they are used in gtkmm. +* Fix compiler issues with gcc-3.3.2 (reported by Jeff Franks). + +1.9.8: + +* Add compatibility module that defines namespace SigC. + namespace SigC should be API compatible to libsigc++-1.2. + Currently only the core parts of the library are supported. + Adaptors are still to follow. +* Fix connection::operator=(). Include connection.h in sigc++.h. +* Get rid of namespace functor. +* Rename dependency to destroy_notify_callback. +* Rename trackable::clear() to trackable::notify_callbacks(). +* Move slot_base, signal_base, slot_iterator[_buf], slot_list + out of namespace internal. They are public API. +* Add reference counter to signal_impl enabling signals + to share the underlying information. +* Add convenience function signal#::make_slot(). +* Get rid of one-letter-parameter-names. +* Get rid of "using namespace ..." in the test cases. +* Add lambda operators subscript ([]) and assign (=). +* Fix is_base_and_derived<> for const types. +* New and updated documentation. +* Add previous announces to file NEWS. + +1.9.7: + +* Added sigc++/sigc++.h. (Murray Cumming) +* Added member_method example. (Murray Cumming) +* Renamed closure to slot. +* Fixed issues with gcc-3.3. (Adreas Rottmann) +* Removed unnecessary void specializations. +* Made adaptors' operator()() (overload with no arguments) return a value. +* Made visit_each() support adaptors. +* Overhauled return type deduction to make it work without typeof(). +* Added convinience macros SIGC_FUNCTORS_HAVE_RESULT_TYPE and +SIGC_FUNCTOR_TRAIT(T_functor, T_result) to make return type deduction system +support 3rd-party funtors. +* Changed syntax of group adaptor from "[functor] % grp([lambdas])" to "group +([functor], [lambdas])". +* Made many fixes to lambda functionality. +* Added var() and constant() lambda creators. +* Added many lambda operators. +* Added ref() which creates a reference wrapper to enable storage of +references in bind and group adaptors. +* Expanded test suite. +* Added documentation. (Corrections by Murray Cumming) + +1.9.6: + +* First public release of the unstable 2.0 generation. + libsigc++ 2.0 uses modern C++ mechanisms to achieve a highly + flexible, yet typesafe callback system. It supports all features of + libsigc++ 1.2 and improves upon it by: + - No need to specify the number of arguments in signal definitions. + - Connection of any compatible (=implicitly convertable) functor + to a signal. + - Implicit type conversions of parameters during signal emission. + - Lambda adaptor for complete restructuring of functor parameter + lists in one line (subject to changes). + - Signal has a fully featured stl style list interface. + - A convinient accumulator API (replacing the old marshaller API). + - Removal of unnecessary memory management functionality. + - Lightweight class "trackable" for use as base class of your + class hierarchy replaces class "Object". diff --git a/libs/sigc++2/README b/libs/sigc++2/README new file mode 100644 index 0000000000..f90f8f055a --- /dev/null +++ b/libs/sigc++2/README @@ -0,0 +1,72 @@ +libsigc++ -- The Typesafe Callback Framework for C++ + + +General information: + + libsigc++ implements a typesafe callback system for standard C++. It + allows you to define signals and to connect those signals to any + callback function, either global or a member function, regardless of + whether it is static or virtual. + + libsigc++ is used by gtkmm to wrap the GTK+ signal system. It does not + depend on GTK or gtkmm. + + Further information about the major release 2.0 is available on the + libsigc++ project home page: http://libsigc.sourceforge.net/ + + +License information: + + Distribution of library and components is under the LGPL as listed in the + file COPYING. Examples and tests are Public Domain. + + +Contact information: + Maintainer: mailto: mschulze@cvs.gnome.org + Maillist: mailto: libsigc-list@gnome.org + Homepage: http://libsigc.sourceforge.net + Online reference documentation: http://libsigc.sourceforge.net/libsigc2/docs/ + Ftp: http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/ + CVS: + + +Overview of the distribution: + + docs/ documentation on the signal system + docs/reference/ reference documentation + + examples/ examples of various signal functions + + sigc++/ source for library + sigc++/macros/ .m4 files used to auto-generate source files + sigc++/functors/ source for library (various functors) + sigc++/functors/macros/ .m4 files used to auto-generate source files + sigc++/adaptors/ source for library (various adaptors) + sigc++/adaptors/macros/ .m4 files used to auto-generate source files + sigc++/adpators/lambda/ source for library (lambda library) + sigc++/adpators/lambda/macros/ .m4 files used to auto-generate source files + + scripts/ automake junk + + tests/ programs testing and verifying proper behaviour + + MSVC_Net2003/ project files for building the library with MSVC .NET 2003 + + +Compatibility: + + Compatible compilers must supports the following recent c++ techniques: + * Partial template (function) specialization. + * Explicit template (member) function instantiation. + * Treat void return as normal return. + + This release has only been tested with gcc-3.3. It should at least also compile with: + * gcc >= 3.2 + * cygwin (gcc >= 3.2) + * mingw32 + * Microsoft Visual Studio .Net 2003 + * Sun Forte C++ compiler >= 5.5 + * Compaq C++ compiler + * Intel compiler + Please report any troubles you encounter with these compilers! + You are also invited to try a compiler that is not listed above. diff --git a/libs/sigc++2/SConscript b/libs/sigc++2/SConscript new file mode 100644 index 0000000000..9ac1ef48ee --- /dev/null +++ b/libs/sigc++2/SConscript @@ -0,0 +1,41 @@ +# -*- python -*- + +import os +import os.path +import glob + +sigc2_files = glob.glob('sigc++/*.cc') + glob.glob('sigc++/functors/*.cc') + glob.glob('sigc++/adaptors/lambda/*.cc') + +Import('env install_prefix') +sigc2 = env.Clone() + +libsigc2 = sigc2.SharedLibrary('sigc++2', sigc2_files) + +if os.access ('autogen.sh', os.F_OK) : + sigc2_configure_script = sigc2.Command ('configure', 'configure.ac', 'cd libs/sigc++2 && ./autogen.sh && cd -', ENV=os.environ) + sigc2_config_h = sigc2.Command('sigc++config.h', [sigc2_configure_script, 'sigc++config.h.in'], 'cd libs/sigc++2 && ./configure && cd -', ENV=os.environ) +else : + sigc2_config_h = sigc2.Command('sigc++config.h', ['configure', 'sigc++config.h.in'], 'cd libs/sigc++2 && ./configure && cd -', ENV=os.environ) + + +Default([sigc2_config_h,libsigc2]) + +env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), libsigc2)) + +env.Alias('tarball', env.Distribute (env['DISTTREE'], + [ 'NEWS', 'README', 'AUTHORS', 'ChangeLog', + 'configure', 'configure.ac', 'Makefile.am', 'SConscript', + 'sigc++/Makefile.in', + 'sigc++config.h', + 'sigc++config.h.in', + 'sigc++-2.0.pc.in', + 'libsigc++-2.0.spec.in', + 'install-sh', + 'Makefile.in', + 'scripts', + 'missing', + ] + sigc2_files + + glob.glob('sigc++/*.h') + + glob.glob('sigc++/functors/*.h') + glob.glob('sigc++/adaptors/lambda/*.h') + + glob.glob('sigc++/adaptors/*.h') + )) diff --git a/libs/sigc++2/TODO b/libs/sigc++2/TODO new file mode 100644 index 0000000000..7ea792aeb0 --- /dev/null +++ b/libs/sigc++2/TODO @@ -0,0 +1,66 @@ +Compatibility: + +- Fix compilation for SUN FORTE C++ 5.5. + + +Configure checks and Makefile issues: + +- When you use a single Makefile.am for + several directories (in sigc++2, all under sigc++/ is ruled by a + single Makefile.am with the new build system), you have a problem when + you do a build where $(srcdir) != $(builddir), since in the build-tree + the necessary subdirectories are not created. So I have to find a + place where to create this directories, in case they do not exist. + This is only an issue for clean CVS checkouts, however (Andy) + + +sigc++-1.2 compatibility: + +- Verify completeness. + + +documentation: + +- Improve documentation: Make groups (see index.html). Exclude stuff to make + the html output readable. + +- Add documentation for adaptors and accumulators. + + +basic functionality: + +- I don't understand what is meant by "stl-pointer-like functions" (Martin): + + slot should have the full set of stl pointer like functions. (Karl Nelson) + + +lambda functionality (I don't understand this (Martin)): + +- Add support for _R to force references down into + the stack frame of lambda. Ie. + + A a; + (_1+_2)(1,a); // fail if no "operator int() const" + +- Call groups in lambda. (Huh, that appears to be in group?) + + +Old TODO's that should be almost finished (Martin): + +- Fine-tooth comb the code looking for missing operator =() function + and missing copy constructors. + +- Improve and expand the test suite. There are a lot of combinations which + should be valid but haven't been tested which are likely to result in + wierd compiler errors if something wasn't done consistantly. + + +Old TODO's that should be finished (Martin): + +- Improve signal#, it currently is just barely functional. +- Add iterator support and stl like functionality to signal. + +- Add blocking capablity to slot. + +- Deinline/move to .cc where possible to move functions into the + library to reduce resulting binary size. diff --git a/libs/sigc++2/aclocal.m4 b/libs/sigc++2/aclocal.m4 new file mode 100644 index 0000000000..7dc11259e2 --- /dev/null +++ b/libs/sigc++2/aclocal.m4 @@ -0,0 +1,7304 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) + +m4_include([scripts/cxx.m4]) +m4_include([scripts/cxx_std.m4]) diff --git a/libs/sigc++2/autogen.sh b/libs/sigc++2/autogen.sh new file mode 100755 index 0000000000..3eadcdcd6e --- /dev/null +++ b/libs/sigc++2/autogen.sh @@ -0,0 +1,114 @@ +#! /bin/sh + +# Copyright (c) 2006, The libsigc++ Development Team +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +# Be Bourne compatible. (stolen from autoconf) +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +PROJECT=libsigc++2 +MIN_AUTOMAKE_VERSION=1.9 + +srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +origdir=`pwd` +cd "$srcdir" + +LIBTOOLIZE_FLAGS="--automake --copy --force $LIBTOOLIZE_FLAGS" +ACLOCAL_FLAGS="-I scripts $ACLOCAL_FLAGS" +AUTOMAKE_FLAGS="--add-missing --copy $AUTOMAKE_FLAGS" + +if test "x$*$AUTOGEN_SUBDIR_MODE" = x +then + echo "I am going to run ./configure with no arguments -- if you wish" + echo "to pass any to it, please specify them on the $0 command line." +fi + +libtoolize=libtoolize +autoconf=autoconf +autoheader=autoheader +aclocal= +automake= +auto_version=0 + +# awk program to transform the output of automake --version +# into an integer value suitable for numeric comparison. +extract_version='{ printf "%.0f", 1000000 * v[split($1, v, " ")] + 1000 * $2 + $3; exit }' + +for suffix in -1.7 -1.8 -1.9 "" +do + aclocal_version=`aclocal$suffix --version /dev/null | awk -F. "$extract_version"` + automake_version=`automake$suffix --version /dev/null | awk -F. "$extract_version"` + + if test "$aclocal_version" -eq "$automake_version" 2>/dev/null \ + && test "$automake_version" -ge "$auto_version" 2>/dev/null + then + auto_version=$automake_version + aclocal=aclocal$suffix + automake=automake$suffix + fi +done + +min_version=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"` + +if test "$auto_version" -ge "$min_version" 2>/dev/null +then :; else + echo "Sorry, at least automake $MIN_AUTOMAKE_VERSION is required to configure $PROJECT." + exit 1 +fi + +rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs +rm -f config.cache acconfig.h +rm -rf autom4te.cache + +#WARNINGS=all +#export WARNINGS + +if (set -x && set +x) >/dev/null 2>&1 +then + set_xtrace=set +else + set_xtrace=: +fi + +$set_xtrace -x + +"$libtoolize" $LIBTOOLIZE_FLAGS || exit 1 +"$aclocal" $ACLOCAL_FLAGS || exit 1 +#"$autoheader" || exit 1 +"$automake" $AUTOMAKE_FLAGS || exit 1 +"$autoconf" || exit 1 +cd "$origdir" || exit 1 + +if test -z "$AUTOGEN_SUBDIR_MODE" +then + "$srcdir/configure" --enable-maintainer-mode ${1+"$@"} || exit 1 + $set_xtrace +x + echo + echo "Now type 'make' to compile $PROJECT." +fi + +exit 0 diff --git a/libs/sigc++2/config.guess b/libs/sigc++2/config.guess new file mode 100755 index 0000000000..e3ef63f6cb --- /dev/null +++ b/libs/sigc++2/config.guess @@ -0,0 +1,1471 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-12-13' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libs/sigc++2/config.sub b/libs/sigc++2/config.sub new file mode 100755 index 0000000000..285164700d --- /dev/null +++ b/libs/sigc++2/config.sub @@ -0,0 +1,1599 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-12-11' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m32c) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + m32c-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libs/sigc++2/configure.ac b/libs/sigc++2/configure.ac new file mode 100644 index 0000000000..dbe415ef94 --- /dev/null +++ b/libs/sigc++2/configure.ac @@ -0,0 +1,126 @@ +dnl Configure.in +dnl +dnl Source for generating compiler independent libraries. +dnl + +#We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT: +dnl thus make format_package-0.0.1.tar.gz +pushdef([FP_MAJOR_VERSION], [2]) +pushdef([FP_MINOR_VERSION], [2]) +pushdef([FP_MICRO_VERSION], [2]) +pushdef([FP_EXTRA_VERSION], []) +pushdef([FP_VERSION], FP_MAJOR_VERSION.FP_MINOR_VERSION.FP_MICRO_VERSION[]FP_EXTRA_VERSION) +# package name, version, support contact, tarball name. +AC_INIT([libsigc++], FP_VERSION, [libsigc-list@gnome.org], [libsigc++]) + +dnl AC_CONFIG_SRCDIR is required name a file which is unique to the package +dnl just to prevent someone from copying the configure to the wrong package. +AC_CONFIG_SRCDIR([sigc++]) + +AC_PREREQ(2.59) + +######################################################################### +# Version and initialization +######################################################################### +[FP_MAJOR_VERSION]=FP_MAJOR_VERSION +[FP_MINOR_VERSION]=FP_MINOR_VERSION +[FP_MICRO_VERSION]=FP_MICRO_VERSION +[FP_EXTRA_VERSION]=FP_EXTRA_VERSION +[FP_VERSION]=FP_VERSION +popdef([FP_MAJOR_VERSION]) +popdef([FP_MINOR_VERSION]) +popdef([FP_MICRO_VERSION]) +popdef([FP_EXTRA_VERSION]) +popdef([FP_VERSION]) +FP_RELEASE=$FP_MAJOR_VERSION.$FP_MINOR_VERSION +AC_DEFINE_UNQUOTED(FP_MAJOR_VERSION, $FP_MAJOR_VERSION, [Major version of libsigc++]) +AC_DEFINE_UNQUOTED(FP_MINOR_VERSION, $FP_MINOR_VERSION, [Minor version of libsigc++]) +AC_DEFINE_UNQUOTED(FP_MICRO_VERSION, $FP_MICRO_VERSION, [Micro version of libsigc++]) +AC_SUBST(FP_VERSION) +AC_SUBST(FP_RELEASE) +AC_SUBST(FP_MAJOR_VERSION) +AC_SUBST(FP_MINOR_VERSION) +AC_SUBST(FP_MICRO_VERSION) + +dnl For automake. +VERSION=$FP_VERSION +PACKAGE=libsigc++ + +# Initialize automake stuff +# tar-ustar asks it to use a sensible tar format that can handle long filenames. +AM_INIT_AUTOMAKE([1.9 tar-ustar]) + +dnl Specify a configuration file: +AC_CONFIG_HEADER(sigc++config.h) + +dnl Macros to support windows platforms +AC_CYGWIN +#AC_MINGW32 +AC_EXEEXT + +dnl this package needs m4 +AC_CHECK_PROGS(M4, gm4 m4, m4) + +dnl perl is needed for building the reference documentation +AC_PATH_PROGS([PERL_PATH], [perl perl5], [perl]) +AC_SUBST([PERL_PATH]) + +dnl disable autoheader +AUTOHEADER=':' + +dnl Maintainer support (autodependencies and packaging) +AM_MAINTAINER_MODE + +dnl Using C compiler +AC_PROG_CC +AC_PROG_CPP + +dnl Used for enabling the "-no-undefined" flag while generating DLLs +dnl Borrowed from the official gtk+-2 configure.in +AC_MSG_CHECKING([for some Win32 platform]) +case "$host" in + *-*-mingw*|*-*-cygwin*) + platform_win32=yes + ;; + *) + platform_win32=no + ;; +esac +AC_MSG_RESULT([$platform_win32]) +AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") + +dnl Using libtool +AC_CONFIG_MACRO_DIR(scripts) +AC_LIBTOOL_WIN32_DLL +dnl: Use with libtool 1.5a instead of AM_PROG_LIBTOOL: LT_INIT +AM_PROG_LIBTOOL + +dnl Using C++ compiler +AC_PROG_CXX +AC_LANG_CPLUSPLUS + +SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD() +SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD() +SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION() +SIGC_CXX_HAS_NAMESPACE_STD() +SIGC_CXX_HAS_SUN_REVERSE_ITERATOR() + +if test "X$config_error" = "Xyes" ; then + AC_ERROR( +[One or more of the required compiler features is missing. +If you believe this is in error, please consult the config.log file +for further details. +]) +fi + + +# Generate output +AC_OUTPUT([ + Makefile + sigc++-2.0.pc + + sigc++/Makefile + scripts/Makefile + libsigc++-2.0.spec + +]) diff --git a/libs/sigc++2/depcomp b/libs/sigc++2/depcomp new file mode 100755 index 0000000000..ca5ea4e1ef --- /dev/null +++ b/libs/sigc++2/depcomp @@ -0,0 +1,584 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2006-10-15.18 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/sigc++2/install-sh b/libs/sigc++2/install-sh new file mode 100755 index 0000000000..4fbbae7b7f --- /dev/null +++ b/libs/sigc++2/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + || { + echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/sigc++2/libsigc++-2.0.spec.in b/libs/sigc++2/libsigc++-2.0.spec.in new file mode 100644 index 0000000000..7dc756c6ce --- /dev/null +++ b/libs/sigc++2/libsigc++-2.0.spec.in @@ -0,0 +1,91 @@ +Summary: The Typesafe Signal Framework for C++ +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1 +License: LGPL +Group: System Environment/Libraries +Packager: Eric Bourque +URL: http://libsigc.sourceforge.net/ +Source0: http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description + +This library implements a full callback system for use in widget +libraries, abstract interfaces, and general programming. Originally +part of the Gtk-- widget set, %name is now a seperate library to +provide for more general use. It is the most complete library of its +kind with the ablity to connect an abstract callback to a class +method, function, or function object. It contains adaptor classes for +connection of dissimilar callbacks and has an ease of use unmatched by +other C++ callback libraries. + +Package GTK-- (gtkmm), which is a C++ binding to the GTK+ library, +starting with version 1.1.2, uses %name. + +Due to C++ ABI changes, this will only work with the gcc version which +the distribution was supplied with. If you got your rpm from any +previous version, please rebuild from spec! + +%package devel +Summary: Development tools for the Typesafe Signal Framework for C++ +Group: Development/Libraries +Requires: %name = %version + +%description devel +The %name-devel package contains the static libraries and header files +needed for development with %name. + +%package examples +Summary: Examples and tests for the Typesafe Signal Framework for C++ +Group: Development/Libraries +Requires: %name-devel = %version + +%description examples +The %name-devel package contains source code of +example and test programs for %name. + + +%prep +%setup -q + +%build +./configure --prefix=/usr +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +mkdir -p -m 755 $RPM_BUILD_ROOT/%{_libdir}/sigc++-2.0 +cp -a examples tests $RPM_BUILD_ROOT/%{_libdir}/sigc++-2.0 + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%{_libdir}/libsigc*.so* +%doc /usr/share/doc/libsigc-2.0 + +%files devel +/usr/include/sigc++-2.0 +%{_libdir}/pkgconfig/* +%{_libdir}/libsigc*.a +%{_libdir}/libsigc*.la +%dir %{_libdir}/sigc++-2.0 +%dir %{_libdir}/sigc++-2.0/include +%{_libdir}/sigc++-2.0/include/sigc++config.h + +%files examples +%{_libdir}/sigc++-2.0/examples +%{_libdir}/sigc++-2.0/tests + +%changelog +* Tue Jun 29 2004 Eric Bourque - 2.0-1 +- Initial build. + diff --git a/libs/sigc++2/ltmain.sh b/libs/sigc++2/ltmain.sh new file mode 100644 index 0000000000..06823e057a --- /dev/null +++ b/libs/sigc++2/ltmain.sh @@ -0,0 +1,6863 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/libs/sigc++2/missing b/libs/sigc++2/missing new file mode 100755 index 0000000000..1c8ff7049d --- /dev/null +++ b/libs/sigc++2/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/sigc++2/scripts/Makefile.am b/libs/sigc++2/scripts/Makefile.am new file mode 100644 index 0000000000..c78f05868f --- /dev/null +++ b/libs/sigc++2/scripts/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = cxx.m4 cxx_std.m4 diff --git a/libs/sigc++2/scripts/Makefile.in b/libs/sigc++2/scripts/Makefile.in new file mode 100644 index 0000000000..8bfb9062fd --- /dev/null +++ b/libs/sigc++2/scripts/Makefile.in @@ -0,0 +1,332 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = scripts +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/scripts/cxx.m4 \ + $(top_srcdir)/scripts/cxx_std.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/sigc++config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FP_MAJOR_VERSION = @FP_MAJOR_VERSION@ +FP_MICRO_VERSION = @FP_MICRO_VERSION@ +FP_MINOR_VERSION = @FP_MINOR_VERSION@ +FP_RELEASE = @FP_RELEASE@ +FP_VERSION = @FP_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL_PATH = @PERL_PATH@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = cxx.m4 cxx_std.m4 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libs/sigc++2/scripts/cxx.m4 b/libs/sigc++2/scripts/cxx.m4 new file mode 100644 index 0000000000..11f1969399 --- /dev/null +++ b/libs/sigc++2/scripts/cxx.m4 @@ -0,0 +1,122 @@ +dnl +dnl SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD() +dnl +dnl +AC_DEFUN([SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[ +AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods.]) +AC_TRY_COMPILE( +[ + #include + + class Thing + { + public: + Thing() + {} + + template + void operator()(T a, T b) + { + T c = a + b; + std::cout << c << std::endl; + } + }; + + template + class OtherThing + { + public: + void do_something() + { + Thing thing_; + thing_.template operator()(1, 2); + //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5: + } + }; +], +[ + OtherThing thing; + thing.do_something(); +], +[ + sigcm_cxx_gcc_template_specialization_operator_overload=yes + AC_DEFINE([SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods.]) + AC_MSG_RESULT([$sigcm_cxx_gcc_template_specialization_operator_overload]) +],[ + sigcm_cxx_gcc_template_specialization_operator_overload=no + AC_MSG_RESULT([$sigcm_cxx_gcc_template_specialization_operator_overload]) +]) +]) + +AC_DEFUN([SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[ +AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods omitting the template keyword.]) +AC_TRY_COMPILE( +[ + #include + + class Thing + { + public: + Thing() + {} + + template + void operator()(T a, T b) + { + T c = a + b; + std::cout << c << std::endl; + } + }; + + template + class OtherThing + { + public: + void do_something() + { + Thing thing_; + thing_.operator()(1, 2); + //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5: + } + }; +], +[ + OtherThing thing; + thing.do_something(); +], +[ + sigcm_cxx_msvc_template_specialization_operator_overload=yes + AC_DEFINE([SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods omitting the template keyword.]) + AC_MSG_RESULT([$sigcm_cxx_msvc_template_specialization_operator_overload]) +],[ + sigcm_cxx_msvc_template_specialization_operator_overload=no + AC_MSG_RESULT([$sigcm_cxx_msvc_template_specialization_operator_overload]) +]) +]) + + +AC_DEFUN([SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION], [ +AC_MSG_CHECKING([if C++ compiler allows usage of member function in initialization of static member field.]) +AC_TRY_COMPILE( +[ + struct test + { + static char test_function(); + + // Doesn't work with e.g. GCC 3.2. However, if test_function() + // is wrapped in a nested structure, it works just fine. + static const bool test_value + = (sizeof(test_function()) == sizeof(char)); + }; +], +[], +[ + sigcm_cxx_self_reference_in_member_initialization=yes + AC_DEFINE([SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION],[1], + [does c++ compiler allows usage of member function in initialization of static member field.]) + AC_MSG_RESULT([$sigcm_cxx_self_reference_in_member_initialization]) +],[ + sigcm_cxx_self_reference_in_member_initialization=no + AC_MSG_RESULT([$sigcm_cxx_self_reference_in_member_initialization]) +]) +]) diff --git a/libs/sigc++2/scripts/cxx_std.m4 b/libs/sigc++2/scripts/cxx_std.m4 new file mode 100644 index 0000000000..b2ff03e385 --- /dev/null +++ b/libs/sigc++2/scripts/cxx_std.m4 @@ -0,0 +1,77 @@ +cv_cxx_has_namespace_std +## SIGC_CXX_HAS_NAMESPACE_STD() +## +## Test whether libstdc++ declares namespace std. For safety, +## also check whether several randomly selected STL symbols +## are available in namespace std. +## +## On success, #define SIGC_HAVE_NAMESPACE_STD to 1. +## +AC_DEFUN([SIGC_CXX_HAS_NAMESPACE_STD], +[ + AC_CACHE_CHECK( + [whether C++ library symbols are declared in namespace std], + [sigc_cv_cxx_has_namespace_std], + [ + AC_TRY_COMPILE( + [ + #include + #include + #include + #include + ],[ + using std::min; + using std::find; + using std::copy; + using std::bidirectional_iterator_tag; + using std::string; + using std::istream; + using std::cout; + ], + [sigc_cv_cxx_has_namespace_std="yes"], + [sigc_cv_cxx_has_namespace_std="no"] + ) + ]) + + if test "x${sigc_cv_cxx_has_namespace_std}" = "xyes"; then + { + AC_DEFINE([SIGC_HAVE_NAMESPACE_STD],[1], [Defined when the libstdc++ declares the std-namespace]) + } + fi +]) + +## SIGC_CXX_HAS_SUN_REVERSE_ITERATOR() +## +## Check for Sun libCstd style std::reverse_iterator, which demands more than just one template parameter. +## and #define SIGC_HAVE_SUN_REVERSE_ITERATOR if found. +## +AC_DEFUN([SIGC_CXX_HAS_SUN_REVERSE_ITERATOR], +[ + AC_REQUIRE([SIGC_CXX_HAS_NAMESPACE_STD]) + + AC_CACHE_CHECK( + [for non-standard Sun libCstd reverse_iterator], + [sigc_cv_cxx_has_sun_reverse_iterator], + [ + AC_TRY_COMPILE( + [ + #include + #ifdef SIGC_HAVE_NAMESPACE_STD + using namespace std; + #endif + ],[ + typedef reverse_iterator ReverseIter; + ], + [sigc_cv_cxx_has_sun_reverse_iterator="yes"], + [sigc_cv_cxx_has_sun_reverse_iterator="no"] + ) + ]) + + if test "x${sigc_cv_cxx_has_sun_reverse_iterator}" = "xyes"; then + { + AC_DEFINE([SIGC_HAVE_SUN_REVERSE_ITERATOR],[1]) + } + fi +]) + + diff --git a/libs/sigc++2/sigc++-2.0.pc.in b/libs/sigc++2/sigc++-2.0.pc.in new file mode 100644 index 0000000000..7c55753531 --- /dev/null +++ b/libs/sigc++2/sigc++-2.0.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libsigc++ 2 +Description: Typesafe signal and callback system for C++ +Version: @VERSION@ +Libs: -L${libdir} -lsigc-2.0 +Cflags: -I${includedir}/sigc++-2.0 -I${libdir}/sigc++-2.0/include diff --git a/libs/sigc++2/sigc++/Makefile.am b/libs/sigc++2/sigc++/Makefile.am new file mode 100644 index 0000000000..20976f9ff1 --- /dev/null +++ b/libs/sigc++2/sigc++/Makefile.am @@ -0,0 +1,105 @@ +# Base (./) +base_m4 = template.macros.m4 signal.h.m4 slot.h.m4 method_slot.h.m4 \ + object_slot.h.m4 class_slot.h.m4 hide.h.m4 retype.h.m4 \ + limit_reference.h.m4 +base_built_cc = +base_built_h = signal.h slot.h method_slot.h \ + object_slot.h class_slot.h hide.h retype.h limit_reference.h + +signal.cc : signal.h signal_base.h functors/slot.h functors/slot_base.h functors/mem_fun.h functors/functor_trait.h + +# Functors (functors/) +functors_m4 = functor_trait.h.m4 slot.h.m4 ptr_fun.h.m4 mem_fun.h.m4 +functors_built_cc = +functors_built_h = functor_trait.h slot.h ptr_fun.h mem_fun.h + +functors/slot.cc : functors/slot.h functors/slot_base.h functors/functor_trait.h + +# Adaptors (adaptors/) +adaptors_m4 = deduce_result_type.h.m4 adaptor_trait.h.m4 bind.h.m4 bind_return.h.m4 \ + retype_return.h.m4 hide.h.m4 retype.h.m4 compose.h.m4 exception_catch.h.m4 +adaptors_built_cc = +adaptors_built_h = deduce_result_type.h adaptor_trait.h bind.h bind_return.h \ + retype_return.h hide.h retype.h compose.h exception_catch.h + +# Lambda (adaptors/lambda) +lambda_m4 = base.h.m4 select.h.m4 operator.h.m4 group.h.m4 lambda.cc.m4 +lambda_built_cc = lambda.cc +lambda_built_h = base.h select.h operator.h group.h + +adaptors/lambda/lambda.cc : adaptors/lambda/select.h adaptors/lambda/base.h \ + adaptors/adaptor_trait.h adaptors/deduce_result_type.h \ + functors/ptr_fun.h functors/mem_fun.h functors/functor_trait.h + +# Subdirectories needed also in the build dir +build_subdirs = functors adaptors adaptors/lambda + +# Combine all the above parts with right directories prefixed +sigc_m4 = $(base_m4:%=macros/%) \ + $(functors_m4:%=functors/macros/%) \ + $(adaptors_m4:%=adaptors/macros/%) \ + $(lambda_m4:%=adaptors/lambda/macros/%) +sigc_built_cc = $(base_built_cc) \ + $(functors_built_cc:%=functors/%) \ + $(adaptors_built_cc:%=adaptors/%) \ + $(lambda_built_cc:%=adaptors/lambda/%) +sigc_built_h = $(base_built_h) \ + $(functors_built_h:%=functors/%) \ + $(adaptors_built_h:%=adaptors/%) \ + $(lambda_built_h:%=adaptors/lambda/%) + +EXTRA_DIST = $(sigc_m4) $(sigc_built_h) $(sigc_built_cc) + +# install the headers +library_includedir = $(includedir)/sigc++-2.0/sigc++ +nobase_library_include_HEADERS = $(sigc_m4) $(sigc_built_h) \ + sigc++.h connection.h trackable.h reference_wrapper.h type_traits.h visit_each.h \ + object.h retype_return.h bind.h bind_return.h signal_base.h \ + functors/functors.h \ + functors/slot_base.h \ + adaptors/adaptors.h \ + adaptors/bound_argument.h \ + adaptors/lambda/lambda.h + +# Support for DLL on cygwin/mingw using libtool > 1.4 +if PLATFORM_WIN32 +win32_dlls_ldflags = -no-undefined -Wl,--export-all-symbols +else +win32_dlls_ldflags = +endif + +# build the library +lib_LTLIBRARIES = libsigc-2.0.la +libsigc_2_0_la_SOURCES = signal.cc signal_base.cc trackable.cc connection.cc \ + functors/slot.cc functors/slot_base.cc \ + adaptors/lambda/lambda.cc +libsigc_2_0_la_LDFLAGS = $(win32_dlls_ldflags) +BUILT_SOURCES = $(sigc_built_h) $(sigc_built_cc) + +CLEANFILES = build-subdirs-stamp + +# Remove the generated sources during maintainer-clean: +MAINTAINERCLEANFILES = $(built_sources) + +M4_DIR = $(top_srcdir)/sigc++/macros + +# Rules to generate .h and .cc from .h.m4 and .cc.m4: +%.h: macros/%.h.m4 $(M4_DIR)/template.macros.m4 + $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@ + +%.cc: macros/%.cc.m4 $(M4_DIR)/template.macros.m4 + $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@ + +# This would be a necessary target for VPATH builds from a clean CVS checkout, +# but I'm not sure where to invoke it... [rotty] +build-subdirs-stamp: + for dir in $(build_subdirs); do \ + test -d $$dir || mkdir $$dir; \ + done + touch build-subdirs-stamp + +# Remove current directory from DEFAULT_INCLUDES because signal.h has +# the same name as a standard header: +DEFAULT_INCLUDES = +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) + diff --git a/libs/sigc++2/sigc++/Makefile.in b/libs/sigc++2/sigc++/Makefile.in new file mode 100644 index 0000000000..11ff5f5904 --- /dev/null +++ b/libs/sigc++2/sigc++/Makefile.in @@ -0,0 +1,641 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = sigc++ +DIST_COMMON = $(nobase_library_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/scripts/cxx.m4 \ + $(top_srcdir)/scripts/cxx_std.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/sigc++config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(library_includedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libsigc_2_0_la_LIBADD = +am_libsigc_2_0_la_OBJECTS = signal.lo signal_base.lo trackable.lo \ + connection.lo slot.lo slot_base.lo lambda.lo +libsigc_2_0_la_OBJECTS = $(am_libsigc_2_0_la_OBJECTS) +libsigc_2_0_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(libsigc_2_0_la_LDFLAGS) $(LDFLAGS) -o $@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsigc_2_0_la_SOURCES) +DIST_SOURCES = $(libsigc_2_0_la_SOURCES) +nobase_library_includeHEADERS_INSTALL = $(install_sh_DATA) +HEADERS = $(nobase_library_include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FP_MAJOR_VERSION = @FP_MAJOR_VERSION@ +FP_MICRO_VERSION = @FP_MICRO_VERSION@ +FP_MINOR_VERSION = @FP_MINOR_VERSION@ +FP_RELEASE = @FP_RELEASE@ +FP_VERSION = @FP_VERSION@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL_PATH = @PERL_PATH@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Base (./) +base_m4 = template.macros.m4 signal.h.m4 slot.h.m4 method_slot.h.m4 \ + object_slot.h.m4 class_slot.h.m4 hide.h.m4 retype.h.m4 \ + limit_reference.h.m4 + +base_built_cc = +base_built_h = signal.h slot.h method_slot.h \ + object_slot.h class_slot.h hide.h retype.h limit_reference.h + + +# Functors (functors/) +functors_m4 = functor_trait.h.m4 slot.h.m4 ptr_fun.h.m4 mem_fun.h.m4 +functors_built_cc = +functors_built_h = functor_trait.h slot.h ptr_fun.h mem_fun.h + +# Adaptors (adaptors/) +adaptors_m4 = deduce_result_type.h.m4 adaptor_trait.h.m4 bind.h.m4 bind_return.h.m4 \ + retype_return.h.m4 hide.h.m4 retype.h.m4 compose.h.m4 exception_catch.h.m4 + +adaptors_built_cc = +adaptors_built_h = deduce_result_type.h adaptor_trait.h bind.h bind_return.h \ + retype_return.h hide.h retype.h compose.h exception_catch.h + + +# Lambda (adaptors/lambda) +lambda_m4 = base.h.m4 select.h.m4 operator.h.m4 group.h.m4 lambda.cc.m4 +lambda_built_cc = lambda.cc +lambda_built_h = base.h select.h operator.h group.h + +# Subdirectories needed also in the build dir +build_subdirs = functors adaptors adaptors/lambda + +# Combine all the above parts with right directories prefixed +sigc_m4 = $(base_m4:%=macros/%) \ + $(functors_m4:%=functors/macros/%) \ + $(adaptors_m4:%=adaptors/macros/%) \ + $(lambda_m4:%=adaptors/lambda/macros/%) + +sigc_built_cc = $(base_built_cc) \ + $(functors_built_cc:%=functors/%) \ + $(adaptors_built_cc:%=adaptors/%) \ + $(lambda_built_cc:%=adaptors/lambda/%) + +sigc_built_h = $(base_built_h) \ + $(functors_built_h:%=functors/%) \ + $(adaptors_built_h:%=adaptors/%) \ + $(lambda_built_h:%=adaptors/lambda/%) + +EXTRA_DIST = $(sigc_m4) $(sigc_built_h) $(sigc_built_cc) + +# install the headers +library_includedir = $(includedir)/sigc++-2.0/sigc++ +nobase_library_include_HEADERS = $(sigc_m4) $(sigc_built_h) \ + sigc++.h connection.h trackable.h reference_wrapper.h type_traits.h visit_each.h \ + object.h retype_return.h bind.h bind_return.h signal_base.h \ + functors/functors.h \ + functors/slot_base.h \ + adaptors/adaptors.h \ + adaptors/bound_argument.h \ + adaptors/lambda/lambda.h + +@PLATFORM_WIN32_FALSE@win32_dlls_ldflags = + +# Support for DLL on cygwin/mingw using libtool > 1.4 +@PLATFORM_WIN32_TRUE@win32_dlls_ldflags = -no-undefined -Wl,--export-all-symbols + +# build the library +lib_LTLIBRARIES = libsigc-2.0.la +libsigc_2_0_la_SOURCES = signal.cc signal_base.cc trackable.cc connection.cc \ + functors/slot.cc functors/slot_base.cc \ + adaptors/lambda/lambda.cc + +libsigc_2_0_la_LDFLAGS = $(win32_dlls_ldflags) +BUILT_SOURCES = $(sigc_built_h) $(sigc_built_cc) +CLEANFILES = build-subdirs-stamp + +# Remove the generated sources during maintainer-clean: +MAINTAINERCLEANFILES = $(built_sources) +M4_DIR = $(top_srcdir)/sigc++/macros + +# Remove current directory from DEFAULT_INCLUDES because signal.h has +# the same name as a standard header: +DEFAULT_INCLUDES = +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sigc++/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu sigc++/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsigc-2.0.la: $(libsigc_2_0_la_OBJECTS) $(libsigc_2_0_la_DEPENDENCIES) + $(libsigc_2_0_la_LINK) -rpath $(libdir) $(libsigc_2_0_la_OBJECTS) $(libsigc_2_0_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lambda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal_base.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slot_base.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trackable.Plo@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +slot.lo: functors/slot.cc +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT slot.lo -MD -MP -MF $(DEPDIR)/slot.Tpo -c -o slot.lo `test -f 'functors/slot.cc' || echo '$(srcdir)/'`functors/slot.cc +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/slot.Tpo $(DEPDIR)/slot.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='functors/slot.cc' object='slot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o slot.lo `test -f 'functors/slot.cc' || echo '$(srcdir)/'`functors/slot.cc + +slot_base.lo: functors/slot_base.cc +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT slot_base.lo -MD -MP -MF $(DEPDIR)/slot_base.Tpo -c -o slot_base.lo `test -f 'functors/slot_base.cc' || echo '$(srcdir)/'`functors/slot_base.cc +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/slot_base.Tpo $(DEPDIR)/slot_base.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='functors/slot_base.cc' object='slot_base.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o slot_base.lo `test -f 'functors/slot_base.cc' || echo '$(srcdir)/'`functors/slot_base.cc + +lambda.lo: adaptors/lambda/lambda.cc +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lambda.lo -MD -MP -MF $(DEPDIR)/lambda.Tpo -c -o lambda.lo `test -f 'adaptors/lambda/lambda.cc' || echo '$(srcdir)/'`adaptors/lambda/lambda.cc +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/lambda.Tpo $(DEPDIR)/lambda.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='adaptors/lambda/lambda.cc' object='lambda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lambda.lo `test -f 'adaptors/lambda/lambda.cc' || echo '$(srcdir)/'`adaptors/lambda/lambda.cc + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-nobase_library_includeHEADERS: $(nobase_library_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_library_include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__vpath_adj) \ + echo " $(nobase_library_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(library_includedir)/$$f'"; \ + $(nobase_library_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(library_includedir)/$$f"; \ + done + +uninstall-nobase_library_includeHEADERS: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_library_include_HEADERS)'; for p in $$list; do \ + $(am__vpath_adj) \ + echo " rm -f '$(DESTDIR)$(library_includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(library_includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-nobase_library_includeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES \ + uninstall-nobase_library_includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_library_includeHEADERS install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES \ + uninstall-nobase_library_includeHEADERS + + +signal.cc : signal.h signal_base.h functors/slot.h functors/slot_base.h functors/mem_fun.h functors/functor_trait.h + +functors/slot.cc : functors/slot.h functors/slot_base.h functors/functor_trait.h + +adaptors/lambda/lambda.cc : adaptors/lambda/select.h adaptors/lambda/base.h \ + adaptors/adaptor_trait.h adaptors/deduce_result_type.h \ + functors/ptr_fun.h functors/mem_fun.h functors/functor_trait.h + +# Rules to generate .h and .cc from .h.m4 and .cc.m4: +%.h: macros/%.h.m4 $(M4_DIR)/template.macros.m4 + $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@ + +%.cc: macros/%.cc.m4 $(M4_DIR)/template.macros.m4 + $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@ + +# This would be a necessary target for VPATH builds from a clean CVS checkout, +# but I'm not sure where to invoke it... [rotty] +build-subdirs-stamp: + for dir in $(build_subdirs); do \ + test -d $$dir || mkdir $$dir; \ + done + touch build-subdirs-stamp +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libs/sigc++2/sigc++/adaptors/adaptor_trait.h b/libs/sigc++2/sigc++/adaptors/adaptor_trait.h new file mode 100644 index 0000000000..b4ae6c5621 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/adaptor_trait.h @@ -0,0 +1,365 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_ +#define _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_ +#include //To get SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD +#include +#include +#include +#include +#include + +namespace sigc { + +// Call either operator()<>() or sun_forte_workaround<>(), +// depending on the compiler: +#ifdef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES template operator() + #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD +#else + #ifdef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES operator() + #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #else + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES sun_forte_workaround + #endif +#endif + + +template struct adapts; + +/** @defgroup adaptors Adaptors + * Adaptors are functors that alter the signature of a functor's + * operator()(). + * + * The adaptor types libsigc++ provides + * are created with bind(), bind_return(), hide(), hide_return(), + * retype_return(), retype(), compose(), exception_catch() and group(). + * + * You can easily derive your own adaptor type from sigc::adapts. + */ + +/** Converts an arbitrary functor into an adaptor type. + * All adaptor tyes in libsigc++ are unnumbered and have + * a template operator() member of every argument count + * they support. These functions in turn invoke a stored adaptor's + * template operator() processing the arguments and return + * value in a characteristic manner. Explicit function template + * instantiation is used to pass type hints thus saving copy costs. + * + * adaptor_functor is a glue between adaptors and arbitrary functors + * that just passes on the arguments. You won't use this type directly. + * + * The template argument @e T_functor determines the type of stored + * functor. + * + * @ingroup adaptors + */ +template +struct adaptor_functor : public adaptor_base +{ + template + struct deduce_result_type + { typedef typename sigc::deduce_result_type::type type; }; + typedef typename functor_trait::result_type result_type; + + /** Invokes the wrapped functor passing on the arguments. + * @return The return value of the functor invocation. + */ + result_type + operator()() const; + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + result_type sun_forte_workaround() const + { return operator(); } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) const + { return functor_(_A_arg1); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) const + { return functor_(_A_arg1,_A_arg2); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) const + { return functor_(_A_arg1,_A_arg2,_A_arg3); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2,_A_arg3); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) const + { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) const + { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) const + { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6,T_arg7 _A_arg7) const + { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6,_A_arg7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6,T_arg7 _A_arg7) const + { //Just calling operator() tries to copy the argument: + return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6,_A_arg7); + } + #endif + + /// Constructs an invalid functor. + adaptor_functor() + {} + + /** Constructs an adaptor_functor object that wraps the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit adaptor_functor(const T_functor& _A_functor) + : functor_(_A_functor) + {} + + /** Constructs an adaptor_functor object that wraps the passed (member) + * function pointer. + * @param _A_type Pointer to function or class method to invoke from operator()(). + */ + template + explicit adaptor_functor(const T_type& _A_type) + : functor_(_A_type) + {} + + /// Functor that is invoked from operator()(). + mutable T_functor functor_; +}; + +template +typename adaptor_functor::result_type +adaptor_functor::operator()() const + { return functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::adaptor_functor performs a functor + * on the functor stored in the sigc::adaptor_functor object. + * + * @ingroup adaptors + */ +template +void visit_each(const T_action& _A_action, + const adaptor_functor& _A_target) +{ + //The extra sigc:: prefix avoids ambiguity in some strange + //situations. + sigc::visit_each(_A_action, _A_target.functor_); +} + + +/** Trait that specifies what is the adaptor version of a functor type. + * Template specializations for sigc::adaptor_base derived functors, + * for function pointers and for class methods are provided. + * + * The template argument @e T_functor is the functor type to convert. + * @e I_isadaptor indicates whether @e T_functor inherits from sigc::adaptor_base. + * + * @ingroup adaptors + */ +template ::value> struct adaptor_trait; + +/** Trait that specifies what is the adaptor version of a functor type. + * This template specialization is used for types that inherit from adaptor_base. + * adaptor_type is equal to @p T_functor in this case. + */ +template +struct adaptor_trait +{ + typedef typename T_functor::result_type result_type; + typedef T_functor functor_type; + typedef T_functor adaptor_type; +}; + +/** Trait that specifies what is the adaptor version of a functor type. + * This template specialization is used for arbitrary functors, + * for function pointers and for class methods are provided. + * The latter are converted into @p pointer_functor or @p mem_functor types. + * adaptor_type is equal to @p adaptor_functor. + */ +template +struct adaptor_trait +{ + typedef typename functor_trait::result_type result_type; + typedef typename functor_trait::functor_type functor_type; + typedef adaptor_functor adaptor_type; +}; + + +/** Base type for adaptors. + * adapts wraps adaptors, functors, function pointers and class methods. + * It contains a single member functor which is always a sigc::adaptor_base. + * The typedef adaptor_type defines the exact type that is used + * to store the adaptor, functor, function pointer or class method passed + * into the constructor. It differs from @e T_functor unless @e T_functor + * inherits from sigc::adaptor_base. + * + * @par Example of a simple adaptor: + * @code + * template + * struct my_adpator : public sigc::adapts + * { + * template + * struct deduce_result_type + * { typedef typename sigc::deduce_result_type::type type; }; + * typedef typename sigc::functor_trait::result_type result_type; + * + * result_type + * operator()() const; + * + * template + * typename deduce_result_type::type + * operator()(T_arg1 _A_arg1) const; + * + * template + * typename deduce_result_type::type + * operator()(T_arg1 _A_arg1, class T_arg2) const; + * + * explicit adaptor_functor(const T_functor& _A_functor) // Constructs a my_functor object that wraps the passed functor. + * : sigc::adapts(_A_functor) {} + * + * mutable T_functor functor_; // Functor that is invoked from operator()(). + * }; + * @endcode + * + * @ingroup adaptors + */ +template +struct adapts : public adaptor_base +{ + typedef typename adaptor_trait::result_type result_type; + typedef typename adaptor_trait::adaptor_type adaptor_type; + + /** Constructs an adaptor that wraps the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit adapts(const T_functor& _A_functor) + : functor_(_A_functor) + {} + + /// Adaptor that is invoked from operator()(). + mutable adaptor_type functor_; +}; + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/adaptors.h b/libs/sigc++2/sigc++/adaptors/adaptors.h new file mode 100644 index 0000000000..950063b122 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/adaptors.h @@ -0,0 +1,32 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_ADAPTOR_HPP_ +#define _SIGC_ADAPTOR_HPP_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _SIGC_ADAPTOR_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/bind.h b/libs/sigc++2/sigc++/adaptors/bind.h new file mode 100644 index 0000000000..746ccee8d4 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/bind.h @@ -0,0 +1,2265 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_BINDHM4_ +#define _SIGC_ADAPTORS_MACROS_BINDHM4_ +#include +#include + +namespace sigc { + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +namespace internal { + +template +struct count_void + { static const int value=0; }; +template +struct count_void + { static const int value=1; }; +template +struct count_void + { static const int value=2; }; +template +struct count_void + { static const int value=3; }; +template +struct count_void + { static const int value=4; }; +template +struct count_void + { static const int value=5; }; +template +struct count_void + { static const int value=6; }; +template <> +struct count_void + { static const int value=7; }; + +} /* namespace internal */ + +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + +/** @defgroup bind bind(), bind_return() + * sigc::bind() alters an arbitrary functor by fixing arguments to certain values. + * Up to 7 arguments can be bound at a time. + * For single argument binding overloads of sigc::bind() are provided that let you + * specify the zero-based position of the argument to fix with the first template parameter. + * (A value of @p -1 fixes the last argument so sigc::bind<-1>() gives the same result as sigc::bind().) + * The types of the arguments can optionally be specified if not deduced. + * + * @par Examples: + * @code + * void foo(int, int, int); + * // single argument binding ... + * sigc::bind(&foo,1)(2,3); //fixes the last (third) argument and calls foo(2,3,1) + * sigc::bind<-1>(&foo,1)(2,3); //same as bind(&foo,1)(2,3) (calls foo(2,3,1)) + * sigc::bind<0>(&foo,1)(2,3); //fixes the first argument and calls foo(1,2,3) + * sigc::bind<1>(&foo,1)(2,3); //fixes the second argument and calls foo(2,1,3) + * sigc::bind<2>(&foo,1)(2,3); //fixes the third argument and calls foo(2,3,1) + * // multi argument binding ... + * sigc::bind(&foo,1,2)(3); //fixes the last two arguments and calls foo(3,1,2) + * sigc::bind(&foo,1,2,3)(); //fixes all three arguments and calls foo(1,2,3) + * @endcode + * + * The functor sigc::bind() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::bind(&foo,1)); + * @endcode + * + * sigc::bind_return() alters an arbitrary functor by + * fixing its return value to a certain value. + * + * @par Example: + * @code + * void foo(); + * std::cout << sigc::bind_return(&foo, 5)(); // calls foo() and returns 5 + * @endcode + * + * You can bind references to functors by passing the objects through + * the sigc::ref() helper function. + * + * @par Example: + * @code + * int some_int; + * sigc::signal some_signal; + * void foo(int&); + * some_signal.connect(sigc::bind(&foo,sigc::ref(some_int))); + * @endcode + * + * If you bind an object of a sigc::trackable derived type to a functor + * by reference, a slot assigned to the bind adaptor is cleared automatically + * when the object goes out of scope. + * + * @par Example: + * @code + * struct bar : public sigc::trackable {} some_bar; + * sigc::signal some_signal; + * void foo(bar&); + * some_signal.connect(sigc::bind(&foo,sigc::ref(some_bar))); + * // disconnected automatically if some_bar goes out of scope + * @endcode + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::bind() provides a means of binding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that binds an argument to the wrapped functor. + * Use the convenience function sigc::bind() to create an instance of sigc::bind_functor. + * + * The following template arguments are used: + * - @e I_location Zero-based position of the argument to fix (@p -1 for the last argument). + + * - @e T_type1 Type of the 1st bound argument. + * - @e T_type2 Type of the 2st bound argument. + * - @e T_type3 Type of the 3st bound argument. + * - @e T_type4 Type of the 4st bound argument. + * - @e T_type5 Type of the 5st bound argument. + * - @e T_type6 Type of the 6st bound argument. + * - @e T_type7 Type of the 7st bound argument. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup bind + */ +template +struct bind_functor; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 1th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<0, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 1th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (bound_.invoke(), _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 2th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<1, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass> + (_A_arg1, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass> + (_A_arg1, bound_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4, _A_arg5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4, _A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1, bound_.invoke(), _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 3th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<2, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4, _A_arg5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4, _A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2, bound_.invoke(), _A_arg3, _A_arg4, _A_arg5, _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 4th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<3, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4, _A_arg5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4, _A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4, _A_arg5, _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3, bound_.invoke(), _A_arg4, _A_arg5, _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 5th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<4, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke(), _A_arg5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke(), _A_arg5); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke(), _A_arg5, _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_.invoke(), _A_arg5, _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 6th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<5, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 6th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 6th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_.invoke(), _A_arg6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass, typename type_trait::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_.invoke(), _A_arg6); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the 7th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<6, T_functor, T_bound, nil,nil,nil,nil,nil,nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the 7th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound_); +} + +/** Adaptor that binds 1 argument(s) to the wrapped functor. + * This template specialization fixes the last 1 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, nil, nil, nil, nil, nil, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<3, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass> (bound1_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 1 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound1_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound1_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1) + : adapts(_A_func), bound1_(_A_bound1) + {} + + /// The argument bound to the functor. + bound_argument bound1_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); +} + +/** Adaptor that binds 2 argument(s) to the wrapped functor. + * This template specialization fixes the last 2 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, nil, nil, nil, nil, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<3, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 2 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 2 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 2 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 2 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke(),bound2_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke(),bound2_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 2 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_.invoke(),bound2_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_.invoke(),bound2_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); +} + +/** Adaptor that binds 3 argument(s) to the wrapped functor. + * This template specialization fixes the last 3 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, T_type3, nil, nil, nil, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 3 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 3 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 3 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 3 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_.invoke(),bound2_.invoke(),bound3_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2,typename type_trait::take _A_bound3) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; + bound_argument bound3_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2,T_type3>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); + visit_each(_A_action, _A_target.bound3_); +} + +/** Adaptor that binds 4 argument(s) to the wrapped functor. + * This template specialization fixes the last 4 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, nil, nil, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 4 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 4 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 4 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2,_A_arg3, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2,typename type_trait::take _A_bound3,typename type_trait::take _A_bound4) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; + bound_argument bound3_; + bound_argument bound4_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); + visit_each(_A_action, _A_target.bound3_); + visit_each(_A_action, _A_target.bound4_); +} + +/** Adaptor that binds 5 argument(s) to the wrapped functor. + * This template specialization fixes the last 5 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, nil, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; + template + struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 5 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke()); + } + #endif + + /** Invokes the wrapped functor passing on the arguments. + * The last 5 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1,_A_arg2, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2,typename type_trait::take _A_bound3,typename type_trait::take _A_bound4,typename type_trait::take _A_bound5) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; + bound_argument bound3_; + bound_argument bound4_; + bound_argument bound5_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); + visit_each(_A_action, _A_target.bound3_); + visit_each(_A_action, _A_target.bound4_); + visit_each(_A_action, _A_target.bound5_); +} + +/** Adaptor that binds 6 argument(s) to the wrapped functor. + * This template specialization fixes the last 6 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, nil> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke(),bound6_.invoke()); + } + + /** Invokes the wrapped functor passing on the arguments. + * The last 6 argument(s) are fixed. + * @param _A_arg1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke(),bound6_.invoke()); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_arg1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> + (_A_arg1, bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke(),bound6_.invoke()); + } + #endif + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2,typename type_trait::take _A_bound3,typename type_trait::take _A_bound4,typename type_trait::take _A_bound5,typename type_trait::take _A_bound6) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5),bound6_(_A_bound6) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; + bound_argument bound3_; + bound_argument bound4_; + bound_argument bound5_; + bound_argument bound6_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); + visit_each(_A_action, _A_target.bound3_); + visit_each(_A_action, _A_target.bound4_); + visit_each(_A_action, _A_target.bound5_); + visit_each(_A_action, _A_target.bound6_); +} + +/** Adaptor that binds 7 argument(s) to the wrapped functor. + * This template specialization fixes the last 7 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass>::type type; }; +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass,typename type_trait::type>::pass> (bound1_.invoke(),bound2_.invoke(),bound3_.invoke(),bound4_.invoke(),bound5_.invoke(),bound6_.invoke(),bound7_.invoke()); + } + + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(typename type_trait::take _A_func, typename type_trait::take _A_bound1,typename type_trait::take _A_bound2,typename type_trait::take _A_bound3,typename type_trait::take _A_bound4,typename type_trait::take _A_bound5,typename type_trait::take _A_bound6,typename type_trait::take _A_bound7) + : adapts(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5),bound6_(_A_bound6),bound7_(_A_bound7) + {} + + /// The argument bound to the functor. + bound_argument bound1_; + bound_argument bound2_; + bound_argument bound3_; + bound_argument bound4_; + bound_argument bound5_; + bound_argument bound6_; + bound_argument bound7_; +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound1_); + visit_each(_A_action, _A_target.bound2_); + visit_each(_A_action, _A_target.bound3_); + visit_each(_A_action, _A_target.bound4_); + visit_each(_A_action, _A_target.bound5_); + visit_each(_A_action, _A_target.bound6_); + visit_each(_A_action, _A_target.bound7_); +} + + +/** Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor. + * The optional template argument @e I_location specifies the zero-based + * position of the argument to be fixed (@p -1 stands for the last argument). + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @return Adaptor that executes @e _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor +bind(const T_functor& _A_func, T_bound1 _A_b1) +{ + return bind_functor + (_A_func, _A_b1); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 1 argument(s) of the passed functor. + * This function overload fixes the last 1 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1> +bind(const T_functor& _A_func, T_type1 _A_b1) +{ return bind_functor<-1, T_functor, + T_type1> + (_A_func, _A_b1); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 2 argument(s) of the passed functor. + * This function overload fixes the last 2 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2> + (_A_func, _A_b1,_A_b2); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 3 argument(s) of the passed functor. + * This function overload fixes the last 3 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @param _A_b3 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3> + (_A_func, _A_b1,_A_b2,_A_b3); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 4 argument(s) of the passed functor. + * This function overload fixes the last 4 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @param _A_b3 Argument to bind to @e _A_func. + * @param _A_b4 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4> + (_A_func, _A_b1,_A_b2,_A_b3,_A_b4); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 5 argument(s) of the passed functor. + * This function overload fixes the last 5 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @param _A_b3 Argument to bind to @e _A_func. + * @param _A_b4 Argument to bind to @e _A_func. + * @param _A_b5 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5> + (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 6 argument(s) of the passed functor. + * This function overload fixes the last 6 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @param _A_b3 Argument to bind to @e _A_func. + * @param _A_b4 Argument to bind to @e _A_func. + * @param _A_b5 Argument to bind to @e _A_func. + * @param _A_b6 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5, + T_type6> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5,T_type6 _A_b6) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5, + T_type6> + (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5,_A_b6); +} + +/** Creates an adaptor of type sigc::bind_functor which fixes the last 7 argument(s) of the passed functor. + * This function overload fixes the last 7 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @param _A_b2 Argument to bind to @e _A_func. + * @param _A_b3 Argument to bind to @e _A_func. + * @param _A_b4 Argument to bind to @e _A_func. + * @param _A_b5 Argument to bind to @e _A_func. + * @param _A_b6 Argument to bind to @e _A_func. + * @param _A_b7 Argument to bind to @e _A_func. + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5, + T_type6, + T_type7> +bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5,T_type6 _A_b6,T_type7 _A_b7) +{ return bind_functor<-1, T_functor, + T_type1, + T_type2, + T_type3, + T_type4, + T_type5, + T_type6, + T_type7> + (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5,_A_b6,_A_b7); +} + + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_BINDHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/bind_return.h b/libs/sigc++2/sigc++/adaptors/bind_return.h new file mode 100644 index 0000000000..e330d78d19 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/bind_return.h @@ -0,0 +1,206 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_ +#define _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_ +#include +#include + +namespace sigc { + +/** Adaptor that fixes the return value of the wrapped functor. + * Use the convenience function sigc::bind_return() to create an instance of sigc::bind_return_functor. + * + * The following template arguments are used: + * - @e T_return Type of the fixed return value. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup bind + */ +template +struct bind_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef typename unwrap_reference::type type; }; + typedef typename unwrap_reference::type result_type; + + /** Invokes the wrapped functor dropping its return value. + * @return The fixed return value. + */ + typename unwrap_reference::type operator()(); + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); return ret_value_.invoke(); + } + #endif + + /** Invokes the wrapped functor passing on the arguments., + * @param _A_arg%1 Argument to be passed on to the functor.) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); return ret_value_.invoke(); + } + #endif + + + /** Constructs a bind_return_functor object that fixes the return value to @p _A_ret_value. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_ret_value Value to return from operator()(). + */ + bind_return_functor(typename type_trait::take _A_functor, typename type_trait::take _A_ret_value) + : adapts(_A_functor), ret_value_(_A_ret_value) + {} + + /// The fixed return value. + bound_argument ret_value_; // public, so that visit_each() can access it +}; + +template +typename unwrap_reference::type bind_return_functor::operator()() + { this->functor_(); return ret_value_.invoke(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_return_functor performs a functor on the + * functor and on the object instance stored in the sigc::bind_return_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_return_functor& _A_target) +{ + visit_each(_A_action, _A_target.ret_value_); + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument. + * + * @param _A_functor Functor that should be wrapped. + * @param _A_ret_value Argument to fix the return value of @e _A_functor to. + * @return Adaptor that executes @e _A_functor on invokation and returns @e _A_ret_value. + * + * @ingroup bind + */ +template +inline bind_return_functor +bind_return(const T_functor& _A_functor, T_return _A_ret_value) +{ return bind_return_functor(_A_functor, _A_ret_value); } + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/bound_argument.h b/libs/sigc++2/sigc++/adaptors/bound_argument.h new file mode 100644 index 0000000000..f6c65afe76 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/bound_argument.h @@ -0,0 +1,165 @@ +/* + * Copyright 2005, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _SIGC_BOUND_ARGUMENT_H_ +#define _SIGC_BOUND_ARGUMENT_H_ + + +#include +#include + + +namespace sigc { + +/** A bound_argument object stores a bound (for instance, with sigc::bind(), or sigc::bind_return()) argument. + * + * If Foo is a wrapped reference to a class Bar (reference_wrapper) then this + * object is implemented on top of a limit_reference. When the slot is + * invoked, the limit_reference::invoke() method provides the argument (a Bar&). + * When the slot is visited (e.g. visit_each<>()), we simply visit the limit_reference, + * which will visit the derived type, or a sigc::trackable base if necessary. + * + * Likewise, If Foo is a wrapped const reference to a class Bar (const_reference_wrapper) + * then this object is implemented on top of a const_limit_reference. + * + * If Foo is something else (such as an argument that is bound by value) bound_argument just + * stores a cop of that value, and both invoke() and visit() simply return it. + * + * This object is used by the bind_functor<> and bind_return_functor<> objects, + * depending on whether the argument is bound as a parameter or as a return value. + * + * The general template implementation is used for parameters that are passed by value. + * @e T_type The type of the bound argument. + */ +template +class bound_argument +{ +public: + /** Constructor. + * @param _A_argument The argument to bind. + */ + bound_argument(const T_type& _A_argument) + : visited_(_A_argument) + {} + + /** Retrieve the entity to visit in visit_each(). + * @return The bound argument. + */ + inline const T_type& visit() const + { return visited_; } + + /** Retrieve the entity to pass to the bound functor or return. + * @return The bound argument. + */ + inline T_type& invoke() + { return visited_; } + +private: + /** The value of the argument. + */ + T_type visited_; +}; + +//Template specialization: +/** bound_argument object for a bound argument that is passed by bind() or + * returned by bind_return() by reference, specialized for reference_wrapper<> types. + * @e T_wrapped The type of the bound argument. + */ +template +class bound_argument< reference_wrapper > +{ +public: + /** Constructor. + * @param _A_argument The argument to bind. + */ + bound_argument(const reference_wrapper& _A_argument) + : visited_(unwrap(_A_argument)) + {} + + /** Retrieve the entity to visit in visit_each(). + * @return The limited_reference to the bound argument. + */ + inline const limit_reference& visit() const + { return visited_; } + + /** Retrieve the entity to pass to the bound functor or return. + * @return The bound argument. + */ + inline T_wrapped& invoke() + { return visited_.invoke(); } + +private: + /** The limited_reference to the bound argument. + */ + limit_reference visited_; +}; + +/** bound_argument object for a bound argument that is passed by bind() or + * returned by bind_return() by const reference, specialized for const reference_wrapper<> types. + * - @e T_wrapped The type of the bound argument. + */ +template +class bound_argument< const_reference_wrapper > +{ +public: + /** Constructor. + * @param _A_argument The argument to bind. + */ + bound_argument(const const_reference_wrapper& _A_argument) + : visited_(unwrap(_A_argument)) + {} + + /** Retrieve the entity to visit in visit_each(). + * @return The const_limited_reference to the bound argument. + */ + inline const const_limit_reference& visit() const + { return visited_; } + + /** Retrieve the entity to pass to the bound functor or return. + * @return The bound argument. + */ + inline const T_wrapped& invoke() + { return visited_.invoke(); } + +private: + /** The const_limited_reference to the bound argument. + */ + const_limit_reference visited_; +}; + +/** Implementation of visit_each() specialized for the bound_argument class. + * Call visit_each() on the entity returned by the bound_argument's visit() + * method. + * @e T_action The type of functor to invoke. + * @e T_type The type of bound_argument. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const bound_argument& _A_argument) +{ + visit_each(_A_action, _A_argument.visit()); +} + + +} /* namespace sigc */ + + +#endif /* _SIGC_BOUND_ARGUMENT_H_ */ diff --git a/libs/sigc++2/sigc++/adaptors/compose.h b/libs/sigc++2/sigc++/adaptors/compose.h new file mode 100644 index 0000000000..2308c8de5e --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/compose.h @@ -0,0 +1,314 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + +#ifndef _SIGC_ADAPTORS_MACROS_COMPOSEHM4_ +#define _SIGC_ADAPTORS_MACROS_COMPOSEHM4_ +#include + +namespace sigc { + +/** @defgroup compose compose() + * sigc::compose() combines two or three arbitrary functors. + * On invokation parameters are passed on to one or two getter functor(s). + * The return value(s) are then passed on to the setter function. + * + * @par Examples: + * @code + * float square_root(float a) { return sqrtf(a); } + * float sum(float a, float b) { return a+b; } + * std::cout << sigc::compose(&square_root, &sum)(9, 16); // calls square_root(sum(3,6)) + * std::cout << sigc::compose(&sum, &square_root, &square_root)(9); // calls sum(square_root(9), square_root(9)) + * @endcode + * + * The functor sigc::compose() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * some_signal.connect(sigc::compose(&square_root, &sum)); + * @endcode + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::bind() provides a means of binding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that combines two functors. + * Use the convenience function sigc::compose() to create an instance of sigc::compose1_functor. + * + * The following template arguments are used: + * - @e T_setter Type of the setter functor to wrap. + * - @e T_getter Type of the getter functor to wrap. + * + * @ingroup compose + */ +template +struct compose1_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + typedef T_setter setter_type; + typedef T_getter getter_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type< + typename sigc::deduce_result_type::type + >::type type; }; + typedef typename adaptor_type::result_type result_type; + + result_type + operator()(); + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2,_A_a3)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2,_A_a3,_A_a4)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7)); + } + + + /** Constructs a compose1_functor object that combines the passed functors. + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + */ + compose1_functor(const T_setter& _A_setter, const T_getter& _A_getter) + : adapts(_A_setter), get_(_A_getter) + {} + + getter_type get_; // public, so that visit_each() can access it +}; + +template +typename compose1_functor::result_type +compose1_functor::operator()() + { return this->functor_(get_()); } + +/** Adaptor that combines three functors. + * Use the convenience function sigc::compose() to create an instance of sigc::compose2_functor. + * + * The following template arguments are used: + * - @e T_setter Type of the setter functor to wrap. + * - @e T_getter1 Type of the first getter functor to wrap. + * - @e T_getter2 Type of the second getter functor to wrap. + * + * @ingroup compose + */ +template +struct compose2_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + typedef T_setter setter_type; + typedef T_getter1 getter1_type; + typedef T_getter2 getter2_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type< + typename sigc::deduce_result_type::type, + typename sigc::deduce_result_type::type + >::type result_type; }; + typedef typename adaptor_type::result_type result_type; + + result_type + operator()(); + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1), get2_(_A_a1)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2), get2_(_A_a1,_A_a2)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2,_A_a3), get2_(_A_a1,_A_a2,_A_a3)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2,_A_a3,_A_a4), get2_(_A_a1,_A_a2,_A_a3,_A_a4)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6)); + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7)); + } + + + /** Constructs a compose2_functor object that combines the passed functors. + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + */ + compose2_functor(const T_setter& _A_setter, + const T_getter1& _A_getter1, + const T_getter2& _A_getter2) + : adapts(_A_setter), get1_(_A_getter1), get2_(_A_getter2) + {} + + getter1_type get1_; // public, so that visit_each() can access it + getter2_type get2_; // public, so that visit_each() can access it +}; + +template +typename compose2_functor::result_type +compose2_functor::operator()() + { return this->functor_(get1_(), get2_()); } + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::compose1_functor performs a functor on the + * functors stored in the sigc::compose1_functor object. + * + * @ingroup compose + */ +template +void visit_each(const T_action& _A_action, + const compose1_functor& _A_target) +{ + typedef compose1_functor type_functor; + + //Note that the AIX compiler needs the actual template types of visit_each to be specified: + typedef typename type_functor::setter_type type_functor1; + visit_each(_A_action, _A_target.functor_); + + typedef typename type_functor::getter_type type_functor_getter; + visit_each(_A_action, _A_target.get_); +} + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::compose2_functor performs a functor on the + * functors stored in the sigc::compose2_functor object. + * + * @ingroup compose + */ +template +void visit_each(const T_action& _A_action, + const compose2_functor& _A_target) +{ + typedef compose2_functor type_functor; + + //Note that the AIX compiler needs the actual template types of visit_each to be specified: + typedef typename type_functor::setter_type type_functor1; + visit_each(_A_action, _A_target.functor_); + + typedef typename type_functor::getter1_type type_functor_getter1; + visit_each(_A_action, _A_target.get1_); + + typedef typename type_functor::getter2_type type_functor_getter2; + visit_each(_A_action, _A_target.get2_); +} + + +/** Creates an adaptor of type sigc::compose1_functor which combines two functors. + * + * @param _A_setter Functor that receives the return value of the invokation of @e _A_getter. + * @param _A_getter Functor to invoke from operator()(). + * @return Adaptor that executes @e _A_setter with the value returned from invokation of @e _A_getter. + * + * @ingroup compose + */ +template +inline compose1_functor +compose(const T_setter& _A_setter, const T_getter& _A_getter) + { return compose1_functor(_A_setter, _A_getter); } + +/** Creates an adaptor of type sigc::compose2_functor which combines three functors. + * + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + * @return Adaptor that executes @e _A_setter with the values return from invokation of @e _A_getter1 and @e _A_getter2. + * + * @ingroup compose + */ +template +inline compose2_functor +compose(const T_setter& _A_setter, const T_getter1& _A_getter1, const T_getter2& _A_getter2) + { return compose2_functor(_A_setter, _A_getter1, _A_getter2); } + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_COMPOSEHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/deduce_result_type.h b/libs/sigc++2/sigc++/adaptors/deduce_result_type.h new file mode 100644 index 0000000000..397bb50ff7 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/deduce_result_type.h @@ -0,0 +1,121 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +/* +*/ +#ifndef _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_ +#define _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_ +#include + + +namespace sigc { + +/** A hint to the compiler. + * Functors which have all methods based on templates + * should publicly inherit from this hint and define + * a nested template class @p deduce_result_type that + * can be used to deduce the methods' return types. + * + * adaptor_base inherits from the functor_base hint so + * derived types should also have a result_type defined. + * + * Adaptors don't inherit from this type directly. They use + * use sigc::adapts as a base type instead. sigc::adaptors + * wraps arbitrary functor types as well as function pointers + * and class methods. + * + * @ingroup adaptors + */ +struct adaptor_base : public functor_base {}; + + +/** Deduce the return type of a functor. + * typename deduce_result_type::type + * deduces a functor's result type if @p functor_type inherits from + * sigc::functor_base and defines @p result_type or if @p functor_type + * is actually a (member) function type. Multi-type functors are not + * supported. + * + * sigc++ adaptors use + * typename deduce_result_type::type + * to determine the return type of their templated operator() overloads. + * + * Adaptors in turn define a nested template class @p deduce_result_type + * that is used by template specializations of the global deduce_result_type + * template to correctly deduce the return types of the adaptor's suitable + * template operator() overload. + * + * @ingroup adaptors + */ +template ::value> +struct deduce_result_type + { typedef typename functor_trait::result_type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 0 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type<>::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 1 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 2 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 3 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 4 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 5 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 6 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for 7 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/exception_catch.h b/libs/sigc++2/sigc++/adaptors/exception_catch.h new file mode 100644 index 0000000000..0303e07c37 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/exception_catch.h @@ -0,0 +1,318 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_ +#define _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_ +#include + +namespace sigc { + +/* + functor adaptor: exception_catch(functor, catcher) + + usage: + + + Future directions: + The catcher should be told what type of return it needs to + return for multiple type functors, to do this the user + will need to derive from catcher_base. +*/ +/** @defgroup exception_catch exception_catch() + * sigc::exception_catch() catches an exception thrown from within + * the wrapped functor and directs it to a catcher functor. + * This catcher can then rethrow the exception and catch it with the proper type. + * + * Note that the catcher is expected to return the same type + * as the wrapped functor so that normal flow can continue. + * + * Catchers can be cascaded to catch multiple types because uncaught + * rethrown exceptions proceed to the next catcher adaptor. + * + * @par Examples: + * @code + * struct my_catch + * { + * int operator()() + * { + * try { throw; } + * catch (std::range_error e) // catch what types we know + * { std::cerr << "caught " << e.what() << std::endl; } + * return 1; + * } + * } + * int foo(); // throws std::range_error + * sigc::exception_catch(&foo, my_catch())(); + * @endcode + * + * The functor sigc::execption_catch() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * some_signal.connect(sigc::exception_catch(&foo, my_catch)); + * @endcode + * + * @ingroup adaptors + */ + +template ::result_type> +struct exception_catch_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type type; }; + typedef T_return result_type; + + result_type + operator()(); + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + catch (...) + { return catcher_(); } + } + + exception_catch_functor(const T_functor& _A_func, + const T_catcher& _A_catcher) + : adapts(_A_func), catcher_(_A_catcher) + {} + + T_catcher catcher_; +}; + +template +typename exception_catch_functor::result_type +exception_catch_functor::operator()() + { + try + { return this->functor_(); } + catch (...) + { return catcher_(); } + } + +// void specialization +template +struct exception_catch_functor : public adapts +{ + typedef void result_type; + typedef typename adapts::adaptor_type adaptor_type; + + void + operator()(); + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + catch (...) + { return catcher_(); } + } + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + catch (...) + { return catcher_(); } + } + + exception_catch_functor() {} + exception_catch_functor(const T_functor& _A_func, + const T_catcher& _A_catcher) + : adapts(_A_func), catcher_(_A_catcher) + {} + ~exception_catch_functor() {} + + T_catcher catcher_; +}; + +template +void exception_catch_functor::operator()() + { + try + { this->functor_(); } // I don't understand why void return doesn't work here (Martin) + catch (...) + { this->catcher_(); } + } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const exception_catch_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.catcher_); +} + + +template +inline exception_catch_functor +exception_catch(const T_functor& _A_func, const T_catcher& _A_catcher) + { return exception_catch_functor(_A_func, _A_catcher); } + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/hide.h b/libs/sigc++2/sigc++/adaptors/hide.h new file mode 100644 index 0000000000..7a9f096407 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/hide.h @@ -0,0 +1,1064 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_HIDEHM4_ +#define _SIGC_ADAPTORS_MACROS_HIDEHM4_ +#include + +namespace sigc { + +/** @defgroup hide hide(), hide_return() + * sigc::hide() alters an arbitrary functor in that it adds a parameter + * whose value is ignored on invocation of the returned functor. + * Thus you can discard one or more of the arguments of a signal. + * + * You may optionally specify the zero-based position of the parameter + * to ignore as a template argument. The default is to ignore the last + * parameter. + * (A value of @p -1 adds a parameter at the end so sigc::hide<-1>() gives the same result as sigc::hide().) + * + * The type of the parameter can optionally be specified if not deduced. + * + * @par Examples: + * @code + * void foo(int, int); + * // single argument hiding ... + * sigc::hide(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2) + * sigc::hide<-1>(&foo)(1,2,3); // same as sigc::hide(&foo)(1,2,3) (calls foo(1,2)) + * sigc::hide<0>(&foo)(1,2,3); // adds a dummy parameter at the beginning and calls foo(2,3) + * sigc::hide<1>(&foo)(1,2,3); // adds a dummy parameter in the middle and calls foo(1,3) + * sigc::hide<2>(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2) + * // multiple argument hiding ... + * sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls foo(1,2) + * @endcode + * + * The functor sigc::hide() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(); + * some_signal.connect(sigc::hide(&foo)); + * @endcode + * + * sigc::hide_return() alters an arbitrary functor by + * dropping its return value, thus converting it to a void functor. + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::hide() provides a means of hiding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * Use the convenience function sigc::hide() to create an instance of sigc::hide_functor. + * + * The following template arguments are used: + * - @e I_location Zero-based position of the dummy parameter (@p -1 for the last parameter). + * - @e T_type Type of the dummy parameter. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup hide + */ +template +struct hide_functor; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the last parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <-1, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the only argument. + * @param _A_arg%1 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1) + { return this->functor_(); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1) + { return this->functor_(); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2, T_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a2); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2, T_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a2); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3, T_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3, T_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4, T_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4, T_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5, T_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5, T_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the last argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6, T_arg7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6, T_arg7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 0th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <0, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the only argument. + * @param _A_arg%1 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1) + { return this->functor_(); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1) + { return this->functor_(); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a2); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a2); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a2, _A_a3); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a2, _A_a3); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + #endif + + /** Invokes the wrapped functor ignoring the 1th argument. + * @param _A_arg1 Argument to be ignored. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 1th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <1, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); } + #endif + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @param _A_arg3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a3); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a3); } + #endif + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4); } + #endif + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6); } + #endif + + /** Invokes the wrapped functor ignoring the 2th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be ignored. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 2th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <2, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a2); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass> + (_A_a1, _A_a2); } + #endif + + /** Invokes the wrapped functor ignoring the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @param _A_arg4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4); } + #endif + + /** Invokes the wrapped functor ignoring the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6); } + #endif + + /** Invokes the wrapped functor ignoring the 3th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be ignored. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 3th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <3, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3); } + #endif + + /** Invokes the wrapped functor ignoring the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be ignored. + * @param _A_arg5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be ignored. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6); } + #endif + + /** Invokes the wrapped functor ignoring the 4th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be ignored. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 4th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <4, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4); } + #endif + + /** Invokes the wrapped functor ignoring the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be ignored. + * @param _A_arg6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5, T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6); } + #endif + + /** Invokes the wrapped functor ignoring the 5th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be ignored. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5, T_arg6 _A_a6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 5th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <5, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass, typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 6th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); } + #endif + + /** Invokes the wrapped functor ignoring the 6th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be ignored. + * @param _A_arg7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a7); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6, T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a7); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the 6th parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <6, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor ignoring the 7th argument. + * @param _A_arg1 Argument to be passed on to the functor. + * @param _A_arg2 Argument to be passed on to the functor. + * @param _A_arg3 Argument to be passed on to the functor. + * @param _A_arg4 Argument to be passed on to the functor. + * @param _A_arg5 Argument to be passed on to the functor. + * @param _A_arg6 Argument to be passed on to the functor. + * @param _A_arg7 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1, T_arg2 _A_a2, T_arg3 _A_a3, T_arg4 _A_a4, T_arg5 _A_a5, T_arg6 _A_a6, T_arg7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass, typename type_trait::pass> + (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); } + #endif + + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::hide_functor performs a functor on the + * functor stored in the sigc::hide_functor object. + * + * @ingroup hide + */ +template +void visit_each(const T_action& _A_action, + const hide_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor. + * The optional template argument @e I_location specifies the zero-based + * position of the dummy parameter in the returned functor (@p -1 stands for the last parameter). + * + * @param _A_func Functor that should be wrapped. + * @return Adaptor that executes @e _A_func ignoring the value of the dummy parameter. + * + * @ingroup hide + */ +template +inline hide_functor +hide(const T_functor& _A_func) + { return hide_functor(_A_func); } + +/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor. + * This overload adds a dummy parameter at the back of the functor's parameter list. + * + * @param _A_func Functor that should be wrapped. + * @return Adaptor that executes @e _A_func ignoring the value of the last parameter. + * + * @ingroup hide + */ +template +inline hide_functor<-1, T_functor> +hide(const T_functor& _A_func) + { return hide_functor<-1, T_functor> (_A_func); } + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_HIDEHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/base.h b/libs/sigc++2/sigc++/adaptors/lambda/base.h new file mode 100644 index 0000000000..a45594c2f6 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/base.h @@ -0,0 +1,415 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_LAMBDA_BASE_HPP_ +#define _SIGC_LAMBDA_BASE_HPP_ +#include +#include + +namespace sigc { + +/** @defgroup lambdas Lambdas + * libsigc++ ships with basic lambda functionality and the sigc::group adaptor that uses lambdas to transform a functor's parameter list. + * + * The lambda selectors sigc::_1, sigc::_2, ..., sigc::_9 are used to select the + * first, second, ..., nineth argument from a list. + * + * @par Examples: + * @code + * std::cout << sigc::_1(10,20,30); // returns 10 + * std::cout << sigc::_2(10,20,30); // returns 20 + * ... + * @endcode + * + * Operators are defined so that lambda selectors can be used e.g. as placeholders in + * arithmetic expressions. + * + * @par Examples: + * @code + * std::cout << (sigc::_1 + 5)(3); // returns (3 + 5) + * std::cout << (sigc::_1 * sigc::_2)(7,10); // returns (7 * 10) + * @endcode + */ + +/** A hint to the compiler. + * All lambda types publically inherit from this hint. + * + * @ingroup lambdas + */ +struct lambda_base : public adaptor_base {}; + +// Forward declaration of lambda. +template struct lambda; + + +namespace internal { + +/** Abstracts lambda functionality. + * Objects of this type store a value that may be of type lambda itself. + * In this case, operator()() executes the lambda (a lambda is always a functor at the same time). + * Otherwise, operator()() simply returns the stored value. + */ +template ::value> struct lambda_core; + +/// Abstracts lambda functionality (template specialization for lambda values). +template +struct lambda_core : public lambda_base +{ + template + struct deduce_result_type + { typedef typename T_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type type; }; + typedef typename T_type::result_type result_type; + typedef T_type lambda_type; + + result_type + operator()() const; + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + lambda_core() {} + + explicit lambda_core(const T_type& v) + : value_(v) {} + + T_type value_; +}; + +template +typename lambda_core::result_type +lambda_core::operator()() const + { return value_(); } + + +/// Abstracts lambda functionality (template specialization for other value types). +template +struct lambda_core : public lambda_base +{ + template + struct deduce_result_type + { typedef T_type type; }; + typedef T_type result_type; // all operator() overloads return T_type. + typedef lambda lambda_type; + + result_type operator()() const; + + template + result_type operator ()(T_arg1) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2,T_arg3) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2,T_arg3) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2,T_arg3,T_arg4) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2,T_arg3,T_arg4) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + result_type operator ()(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + explicit lambda_core(typename type_trait::take v) + : value_(v) {} + + T_type value_; +}; + +template +typename lambda_core::result_type lambda_core::operator()() const + { return value_; } + +} /* namespace internal */ + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const internal::lambda_core& _A_target) +{ + visit_each(_A_action, _A_target.value_); +} + + +// forward declarations for lambda operators other and other +template +struct other; +struct subscript; +struct assign; + +template +struct lambda_operator; + +template +struct unwrap_lambda_type; + + +/** Lambda type. + * Objects of this type store a value that may be of type lambda itself. + * In this case, operator()() executes the lambda (a lambda is always a functor at the same time). + * Otherwise, operator()() simply returns the stored value. + * The assign and subscript operators are defined to return a lambda operator. + * + * @ingroup lambdas + */ +template +struct lambda : public internal::lambda_core +{ + typedef lambda self; + + lambda() + {} + + lambda(typename type_trait::take v) + : internal::lambda_core(v) + {} + + // operators for other + template + lambda, self, typename unwrap_lambda_type::type> > + operator [] (const T_arg& a) const + { typedef lambda_operator, self, typename unwrap_lambda_type::type> lambda_operator_type; + return lambda(lambda_operator_type(this->value_, unwrap_lambda_value(a))); } + + // operators for other + template + lambda, self, typename unwrap_lambda_type::type> > + operator = (const T_arg& a) const + { typedef lambda_operator, self, typename unwrap_lambda_type::type> lambda_operator_type; + return lambda(lambda_operator_type(this->value_, unwrap_lambda_value(a))); } +}; + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda& _A_target) +{ + visit_each(_A_action, _A_target.value_); +} + + +/** Converts a reference into a lambda object. + * sigc::var creates a 0-ary functor, returning the value of a referenced variable. + * + * @par Example: + * @code + * int main(int argc, char* argv) + * { + * int data; + * sigc::signal readValue; + * + * readValue.connect(sigc::var(data)); + * + * data = 3; + * std::cout << readValue() << std::endl; //Prints 3. + * + * data = 5; + * std::cout << readValue() << std::endl; //Prints 5. + * } + * @endcode + */ +template +lambda var(T_type& v) +{ return lambda(v); } + +/** Converts a constant reference into a lambda object. + */ +template +lambda var(const T_type& v) +{ return lambda(v); } + + +/** Deduces the type of the object stored in an object of the passed lambda type. + * If the type passed as template argument is no lambda type, + * type is defined to unwrap_reference::type. + */ +template +struct unwrap_lambda_type +{ typedef typename unwrap_reference::type type; }; + +template +struct unwrap_lambda_type > +{ typedef T_type type; }; + + +/** Gets the object stored inside a lambda object. + * Returns the object passed as argument if it is not of type lambda. + */ +template +T_type& unwrap_lambda_value(T_type& a) +{ return a; } + +template +const T_type& unwrap_lambda_value(const T_type& a) +{ return a; } + +template +const T_type& unwrap_lambda_value(const lambda& a) +{ return a.value_; } + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_BASE_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/group.h b/libs/sigc++2/sigc++/adaptors/lambda/group.h new file mode 100644 index 0000000000..ef778df81d --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/group.h @@ -0,0 +1,737 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_ +#define _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_ +#include + +/** @defgroup group_ group() + * sigc::group() alters an arbitrary functor by rebuilding its arguments from one or more lambda expressions. + * For each parameter that should be passed to the wrapped functor one lambda expression + * has to be passed into group(). Lambda selectors can be used as placeholders for the + * arguments passed into the new functor. Arguments that don't have a placeholder in one + * of the lambda expressions are dropped. + * + * @par Examples: + * @code + * void foo(int, int); + * int bar(int); + * // argument binding ... + * sigc::group(&foo,10,sigc::_1)(20); //fixes the first argument and calls foo(10,20) + * sigc::group(&foo,sigc::_1,30)(40); //fixes the second argument and calls foo(40,30) + * // argument reordering ... + * sigc::group(&foo,sigc::_2,sigc::_1)(1,2); //calls foo(2,1) + * // argument hiding ... + * sigc::group(&foo,sigc::_1,sigc::_2)(1,2,3); //calls foo(1,2) + * // functor composition ... + * sigc::group(&foo,sigc::_1,sigc::group(&bar,sigc::_2))(1,2); //calls foo(1,bar(2)) + * // algebraic expressions ... + * sigc::group(&foo,sigc::_1*sigc::_2,sigc::_1/sigc::_2)(6,3); //calls foo(6*3,6/3) + * @endcode + * + * The functor sigc::group() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::group(&foo,sigc::_2)); + * @endcode + * + * Like in sigc::bind() you can bind references to functors by passing the objects + * through the sigc::ref() helper function. + * + * @par Example: + * @code + * int some_int; + * sigc::signal some_signal; + * void foo(int&); + * some_signal.connect(sigc::group(&foo,sigc::ref(some_int))); + * @endcode + * + * If you bind an object of a sigc::trackable derived type to a functor + * by reference, a slot assigned to the group adaptor is cleared automatically + * when the object goes out of scope. + * + * @par Example: + * @code + * struct bar : public sigc::trackable {} some_bar; + * sigc::signal some_signal; + * void foo(bar&); + * some_signal.connect(sigc::group(&foo,sigc::ref(some_bar))); + * // disconnected automatically if some_bar goes out of scope + * @endcode + * + * @ingroup adaptors, lambdas + */ + +namespace sigc { + +template +struct lambda_group1 : public lambda_base +{ + typedef typename functor_trait::result_type result_type; + typedef typename lambda::lambda_type value1_type; + typedef typename adaptor_trait::adaptor_type functor_type; + + template + struct deduce_result_type + { typedef typename functor_type::template deduce_result_type< + typename value1_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type + >::type type; }; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + lambda_group1(typename type_trait::take _A_func, typename type_trait::take _A_1) + : value1_(_A_1), func_(_A_func) {} + + value1_type value1_; + mutable functor_type func_; +}; + +template +typename lambda_group1::result_type +lambda_group1::operator ()() const + { return func_(value1_()); } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_group1& _A_target) +{ + visit_each(_A_action, _A_target.value1_); + visit_each(_A_action, _A_target.func_); +} + + +template +struct lambda_group2 : public lambda_base +{ + typedef typename functor_trait::result_type result_type; + typedef typename lambda::lambda_type value1_type; + typedef typename lambda::lambda_type value2_type; + typedef typename adaptor_trait::adaptor_type functor_type; + + template + struct deduce_result_type + { typedef typename functor_type::template deduce_result_type< + typename value1_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type, + typename value2_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type + >::type type; }; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + lambda_group2(typename type_trait::take _A_func, typename type_trait::take _A_1,typename type_trait::take _A_2) + : value1_(_A_1),value2_(_A_2), func_(_A_func) {} + + value1_type value1_; + value2_type value2_; + mutable functor_type func_; +}; + +template +typename lambda_group2::result_type +lambda_group2::operator ()() const + { return func_(value1_(),value2_()); } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_group2& _A_target) +{ + visit_each(_A_action, _A_target.value1_); + visit_each(_A_action, _A_target.value2_); + visit_each(_A_action, _A_target.func_); +} + + +template +struct lambda_group3 : public lambda_base +{ + typedef typename functor_trait::result_type result_type; + typedef typename lambda::lambda_type value1_type; + typedef typename lambda::lambda_type value2_type; + typedef typename lambda::lambda_type value3_type; + typedef typename adaptor_trait::adaptor_type functor_type; + + template + struct deduce_result_type + { typedef typename functor_type::template deduce_result_type< + typename value1_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type, + typename value2_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type, + typename value3_type::template deduce_result_type< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type + >::type type; }; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass>(_A_1)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename value1_type::template deduce_result_type::type, + typename value2_type::template deduce_result_type::type, + typename value3_type::template deduce_result_type::type>( + this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES< + typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + lambda_group3(typename type_trait::take _A_func, typename type_trait::take _A_1,typename type_trait::take _A_2,typename type_trait::take _A_3) + : value1_(_A_1),value2_(_A_2),value3_(_A_3), func_(_A_func) {} + + value1_type value1_; + value2_type value2_; + value3_type value3_; + mutable functor_type func_; +}; + +template +typename lambda_group3::result_type +lambda_group3::operator ()() const + { return func_(value1_(),value2_(),value3_()); } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_group3& _A_target) +{ + visit_each(_A_action, _A_target.value1_); + visit_each(_A_action, _A_target.value2_); + visit_each(_A_action, _A_target.value3_); + visit_each(_A_action, _A_target.func_); +} + + + +template +lambda::type> > +group(const T_functor& _A_func, T_type1 _A_1) +{ + typedef lambda_group1::type> T_lambda; + return lambda(T_lambda(_A_func, _A_1)); +} + +template +lambda::type,typename unwrap_reference::type> > +group(const T_functor& _A_func, T_type1 _A_1,T_type2 _A_2) +{ + typedef lambda_group2::type,typename unwrap_reference::type> T_lambda; + return lambda(T_lambda(_A_func, _A_1,_A_2)); +} + +template +lambda::type,typename unwrap_reference::type,typename unwrap_reference::type> > +group(const T_functor& _A_func, T_type1 _A_1,T_type2 _A_2,T_type3 _A_3) +{ + typedef lambda_group3::type,typename unwrap_reference::type,typename unwrap_reference::type> T_lambda; + return lambda(T_lambda(_A_func, _A_1,_A_2,_A_3)); +} + + + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc b/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc new file mode 100644 index 0000000000..78fd516df2 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc @@ -0,0 +1,15 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#include + +namespace sigc { + +const lambda _1; +const lambda _2; +const lambda _3; +const lambda _4; +const lambda _5; +const lambda _6; +const lambda _7; + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/lambda.h b/libs/sigc++2/sigc++/adaptors/lambda/lambda.h new file mode 100644 index 0000000000..487522ad10 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/lambda.h @@ -0,0 +1,28 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_LAMBDA_HPP_ +#define _SIGC_LAMBDA_HPP_ + +#include +#include +#include +#include + +#endif /* _SIGC_LAMBDA_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/macros/base.h.m4 b/libs/sigc++2/sigc++/adaptors/lambda/macros/base.h.m4 new file mode 100644 index 0000000000..cde9b98c7c --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/macros/base.h.m4 @@ -0,0 +1,317 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +define([LAMBDA_DO],[dnl + template + typename deduce_result_type::type + operator ()(LOOP(T_arg%1 _A_%1, $1)) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_%1, $1)) const + { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + +])dnl +define([LAMBDA_DO_VALUE],[dnl + template + result_type operator ()(LOOP(T_arg%1, $1)) const + { return value_; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + result_type sun_forte_workaround(LOOP(T_arg%1, $1)) const + { return value_; } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + +])dnl + +divert(0)dnl +#ifndef _SIGC_LAMBDA_BASE_HPP_ +#define _SIGC_LAMBDA_BASE_HPP_ +#include +#include + +namespace sigc { + +/** @defgroup lambdas Lambdas + * libsigc++ ships with basic lambda functionality and the sigc::group adaptor that uses lambdas to transform a functor's parameter list. + * + * The lambda selectors sigc::_1, sigc::_2, ..., sigc::_9 are used to select the + * first, second, ..., nineth argument from a list. + * + * @par Examples: + * @code + * std::cout << sigc::_1(10,20,30); // returns 10 + * std::cout << sigc::_2(10,20,30); // returns 20 + * ... + * @endcode + * + * Operators are defined so that lambda selectors can be used e.g. as placeholders in + * arithmetic expressions. + * + * @par Examples: + * @code + * std::cout << (sigc::_1 + 5)(3); // returns (3 + 5) + * std::cout << (sigc::_1 * sigc::_2)(7,10); // returns (7 * 10) + * @endcode + */ + +/** A hint to the compiler. + * All lambda types publically inherit from this hint. + * + * @ingroup lambdas + */ +struct lambda_base : public adaptor_base {}; + +// Forward declaration of lambda. +template struct lambda; + + +namespace internal { + +/** Abstracts lambda functionality. + * Objects of this type store a value that may be of type lambda itself. + * In this case, operator()() executes the lambda (a lambda is always a functor at the same time). + * Otherwise, operator()() simply returns the stored value. + */ +template ::value> struct lambda_core; + +/// Abstracts lambda functionality (template specialization for lambda values). +template +struct lambda_core : public lambda_base +{ + template + struct deduce_result_type + { typedef typename T_type::template deduce_result_type::type type; }; + typedef typename T_type::result_type result_type; + typedef T_type lambda_type; + + result_type + operator()() const; + +FOR(1,CALL_SIZE,[[LAMBDA_DO(%1)]])dnl + lambda_core() {} + + explicit lambda_core(const T_type& v) + : value_(v) {} + + T_type value_; +}; + +template +typename lambda_core::result_type +lambda_core::operator()() const + { return value_(); } + + +/// Abstracts lambda functionality (template specialization for other value types). +template +struct lambda_core : public lambda_base +{ + template + struct deduce_result_type + { typedef T_type type; }; + typedef T_type result_type; // all operator() overloads return T_type. + typedef lambda lambda_type; + + result_type operator()() const; + +FOR(1,CALL_SIZE,[[LAMBDA_DO_VALUE(%1)]])dnl + explicit lambda_core(typename type_trait::take v) + : value_(v) {} + + T_type value_; +}; + +template +typename lambda_core::result_type lambda_core::operator()() const + { return value_; } + +} /* namespace internal */ + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const internal::lambda_core& _A_target) +{ + visit_each(_A_action, _A_target.value_); +} + + +// forward declarations for lambda operators other and other +template +struct other; +struct subscript; +struct assign; + +template +struct lambda_operator; + +template +struct unwrap_lambda_type; + + +/** Lambda type. + * Objects of this type store a value that may be of type lambda itself. + * In this case, operator()() executes the lambda (a lambda is always a functor at the same time). + * Otherwise, operator()() simply returns the stored value. + * The assign and subscript operators are defined to return a lambda operator. + * + * @ingroup lambdas + */ +template +struct lambda : public internal::lambda_core +{ + typedef lambda self; + + lambda() + {} + + lambda(typename type_trait::take v) + : internal::lambda_core(v) + {} + + // operators for other + template + lambda, self, typename unwrap_lambda_type::type> > + operator [[]] (const T_arg& a) const + { typedef lambda_operator, self, typename unwrap_lambda_type::type> lambda_operator_type; + return lambda(lambda_operator_type(this->value_, unwrap_lambda_value(a))); } + + // operators for other + template + lambda, self, typename unwrap_lambda_type::type> > + operator = (const T_arg& a) const + { typedef lambda_operator, self, typename unwrap_lambda_type::type> lambda_operator_type; + return lambda(lambda_operator_type(this->value_, unwrap_lambda_value(a))); } +}; + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda& _A_target) +{ + visit_each(_A_action, _A_target.value_); +} + +dnl /* With the Sun FORTE and the Compaq C++ compiler, +dnl * sigc::var() doesn't work with string constants. +dnl * Some work-araound is needed to convert 'const (&) char[N]' +dnl * into 'const char*'. The following work-around works with gcc +dnl * but neither with the Sun FORTE nor with the Compaq C++ compiler +dnl * (for the gcc the work-around is not needed, anyway): +dnl */ +dnl namespace internal { +dnl +dnl template +dnl struct convert_array +dnl { typedef T_type& type; }; +dnl +dnl template +dnl struct convert_array +dnl { typedef T_type* type; }; +dnl +dnl } /* namespace internal */ +dnl +dnl /// Converts a constant variable into a lambda object. +dnl template +dnl lambda constant(const T_type& v) +dnl { return lambda(v); } +dnl +dnl /// Converts a reference into a lambda object. +dnl template +dnl lambda::type> var(T_type& v) +dnl { return lambda::type>(v); } +dnl +dnl /// Converts a constant reference into a lambda object. +dnl template +dnl lambda::type> var(const T_type& v) +dnl { return lambda::type>(v); } + +/** Converts a reference into a lambda object. + * sigc::var creates a 0-ary functor, returning the value of a referenced variable. + * + * @par Example: + * @code + * int main(int argc, char* argv[]) + * { + * int data; + * sigc::signal readValue; + * + * readValue.connect(sigc::var(data)); + * + * data = 3; + * std::cout << readValue() << std::endl; //Prints 3. + * + * data = 5; + * std::cout << readValue() << std::endl; //Prints 5. + * } + * @endcode + */ +template +lambda var(T_type& v) +{ return lambda(v); } + +/** Converts a constant reference into a lambda object. + */ +template +lambda var(const T_type& v) +{ return lambda(v); } + + +/** Deduces the type of the object stored in an object of the passed lambda type. + * If the type passed as template argument is no lambda type, + * type is defined to unwrap_reference::type. + */ +template +struct unwrap_lambda_type +{ typedef typename unwrap_reference::type type; }; + +template +struct unwrap_lambda_type > +{ typedef T_type type; }; + + +/** Gets the object stored inside a lambda object. + * Returns the object passed as argument if it is not of type lambda. + */ +template +T_type& unwrap_lambda_value(T_type& a) +{ return a; } + +template +const T_type& unwrap_lambda_value(const T_type& a) +{ return a; } + +template +const T_type& unwrap_lambda_value(const lambda& a) +{ return a.value_; } + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_BASE_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/macros/group.h.m4 b/libs/sigc++2/sigc++/adaptors/lambda/macros/group.h.m4 new file mode 100644 index 0000000000..fa3ab4c4bd --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/macros/group.h.m4 @@ -0,0 +1,176 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +dnl +dnl How to call the darn thing! +define([LAMBDA_GROUP_FACTORY],[dnl +template +lambda::type, $1)> > +group(const T_functor& _A_func, LOOP(T_type%1 _A_%1, $1)) +{ + typedef lambda_group$1::type, $1)> T_lambda; + return lambda(T_lambda(_A_func, LOOP(_A_%1, $1))); +} + +]) +dnl +dnl How to call the darn thing! +define([LAMBDA_GROUP_DO],[dnl +define([_L_],[LOOP(_A_%1, $2)])dnl +define([_T_],[LOOP(T_arg%1, $2)])dnl +dnl Please someone get a gun! + template + typename deduce_result_type::type + operator() (LOOP(T_arg%1 _A_%1, $2)) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type],$1)>(LOOP([ + this->value%1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES(_L_)],$1)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround (LOOP(T_arg%1 _A_%1, $2)) const + { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type],$1)>(LOOP([ + this->value%1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES(_L_)],$1)); } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + +]) +dnl +dnl This really doesn't have much to do with lambda other than +dnl holding lambdas with in itself. +define([LAMBDA_GROUP],[dnl +template +struct lambda_group$1 : public lambda_base +{ + typedef typename functor_trait::result_type result_type;dnl +FOR(1, $1,[ + typedef typename lambda::lambda_type value%1_type;]) + typedef typename adaptor_trait::adaptor_type functor_type; + + template + struct deduce_result_type + { typedef typename functor_type::template deduce_result_type::type],$1) + >::type type; }; + + result_type + operator ()() const; + +FOR(1,CALL_SIZE,[[LAMBDA_GROUP_DO($1,%1)]])dnl + lambda_group$1(typename type_trait::take _A_func, LOOP(typename type_trait::take _A_%1, $1)) + : LOOP(value%1_(_A_%1), $1), func_(_A_func) {}dnl + +FOR(1, $1,[ + value%1_type value%1_;]) + mutable functor_type func_; +}; + +template +typename lambda_group$1::result_type +lambda_group$1::operator ()() const + { return func_(LOOP(value%1_(), $1)); } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_group$1& _A_target) +{dnl +FOR(1, $1,[ + visit_each(_A_action, _A_target.value%1_);]) + visit_each(_A_action, _A_target.func_); +} + + +]) +divert(0)dnl +__FIREWALL__ +#include + +/** @defgroup group_ group() + * sigc::group() alters an arbitrary functor by rebuilding its arguments from one or more lambda expressions. + * For each parameter that should be passed to the wrapped functor one lambda expression + * has to be passed into group(). Lambda selectors can be used as placeholders for the + * arguments passed into the new functor. Arguments that don't have a placeholder in one + * of the lambda expressions are dropped. + * + * @par Examples: + * @code + * void foo(int, int); + * int bar(int); + * // argument binding ... + * sigc::group(&foo,10,sigc::_1)(20); //fixes the first argument and calls foo(10,20) + * sigc::group(&foo,sigc::_1,30)(40); //fixes the second argument and calls foo(40,30) + * // argument reordering ... + * sigc::group(&foo,sigc::_2,sigc::_1)(1,2); //calls foo(2,1) + * // argument hiding ... + * sigc::group(&foo,sigc::_1,sigc::_2)(1,2,3); //calls foo(1,2) + * // functor composition ... + * sigc::group(&foo,sigc::_1,sigc::group(&bar,sigc::_2))(1,2); //calls foo(1,bar(2)) + * // algebraic expressions ... + * sigc::group(&foo,sigc::_1*sigc::_2,sigc::_1/sigc::_2)(6,3); //calls foo(6*3,6/3) + * @endcode + * + * The functor sigc::group() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::group(&foo,sigc::_2)); + * @endcode + * + * Like in sigc::bind() you can bind references to functors by passing the objects + * through the sigc::ref() helper function. + * + * @par Example: + * @code + * int some_int; + * sigc::signal some_signal; + * void foo(int&); + * some_signal.connect(sigc::group(&foo,sigc::ref(some_int))); + * @endcode + * + * If you bind an object of a sigc::trackable derived type to a functor + * by reference, a slot assigned to the group adaptor is cleared automatically + * when the object goes out of scope. + * + * @par Example: + * @code + * struct bar : public sigc::trackable {} some_bar; + * sigc::signal some_signal; + * void foo(bar&); + * some_signal.connect(sigc::group(&foo,sigc::ref(some_bar))); + * // disconnected automatically if some_bar goes out of scope + * @endcode + * + * @ingroup adaptors, lambdas + */ + +namespace sigc { + +FOR(1,3,[[LAMBDA_GROUP(%1, CALL_SIZE)]]) +FOR(1,3,[[LAMBDA_GROUP_FACTORY(%1)]]) + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/macros/lambda.cc.m4 b/libs/sigc++2/sigc++/adaptors/lambda/macros/lambda.cc.m4 new file mode 100644 index 0000000000..c7aed5775a --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/macros/lambda.cc.m4 @@ -0,0 +1,26 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) +divert(0)dnl +#include + +namespace sigc { + +FOR(1,CALL_SIZE,[[const lambda _%1; +]]) +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/macros/operator.h.m4 b/libs/sigc++2/sigc++/adaptors/lambda/macros/operator.h.m4 new file mode 100644 index 0000000000..d97a2e5ce2 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/macros/operator.h.m4 @@ -0,0 +1,523 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +dnl +dnl Macros to make operators +define([LAMBDA_OPERATOR_DO],[dnl + template + typename deduce_result_type::type + operator ()(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action::template do_action< + typename deduce_result_type::left_type, + typename deduce_result_type::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1)), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action::template do_action< + typename deduce_result_type::left_type, + typename deduce_result_type::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1)), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + +])dnl +define([LAMBDA_OPERATOR_UNARY_DO],[dnl + template + typename deduce_result_type::type + operator ()(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + #endif + +])dnl +define([LAMBDA_OPERATOR_CONVERT_DO],[dnl + template + typename deduce_result_type::type + operator ()(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_%1, $1)) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_%1, $1))); + } + #endif + +])dnl +define([LAMBDA_OPERATOR],[dnl +divert(1)dnl +template <> +struct lambda_action<$1 > +{ + template + static typename lambda_action_deduce_result_type<$1, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 $2 _A_2; } +}; + +divert(2)dnl +// Operators for lambda action $1. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda > +operator $2 (const lambda& a1, const lambda& a2) +{ typedef lambda_operator<$1, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda::type> > +operator $2 (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator<$1, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda::type, T_arg2> > +operator $2 (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator<$1, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +divert(0)dnl +]) +define([LAMBDA_OPERATOR_UNARY],[dnl +divert(1)dnl +template <> +struct lambda_action_unary<$1 > +{ + template + static typename lambda_action_unary_deduce_result_type<$1, T_arg>::type + do_action(T_arg _Aa) + { return $2[]_Aa; } +}; + +divert(2)dnl +// Operator for lambda action $1. +template +lambda > +operator $2 (const lambda& a) +{ typedef lambda_operator_unary<$1, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +divert(0)dnl +]) +define([LAMBDA_OPERATOR_CONVERT],[dnl +divert(1)dnl +template +struct lambda_action_convert<$1, T_type> +{ + template + static typename lambda_action_convert_deduce_result_type<$1, T_type, T_arg>::type + do_action(T_arg _Aa) + { return $2(_Aa); } +}; + +divert(2)dnl +// Creators for lambda action $1. +template +lambda::type> > +$2_(const T_arg& a) +{ typedef lambda_operator_convert<$1, T_type, typename unwrap_lambda_type::type> operator_type; + return lambda(operator_type(unwrap_lambda_value(a))); } + +divert(0)dnl +]) +divert(0)dnl +#ifndef _SIGC_LAMBDA_OPERATOR_HPP_ +#define _SIGC_LAMBDA_OPERATOR_HPP_ +#include + +namespace sigc { + +/** Deduces the base type of a reference or a pointer. + * @ingroup internal + */ +template +struct dereference_trait + { typedef void type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct arithmetic {}; + +template +struct bitwise {}; + +template +struct logical {}; + +template +struct relational {}; + +template +struct arithmetic_assign {}; + +template +struct bitwise_assign {}; + +template +struct other {}; + +template +struct unary_arithmetic {}; + +template +struct unary_bitwise {}; + +template +struct unary_logical {}; + +template +struct unary_other {}; + +template +struct cast_ {}; + +struct plus {}; +struct minus {}; +struct multiplies {}; +struct divides {}; +struct modulus {}; +struct leftshift {}; +struct rightshift {}; +struct and_ {}; +struct or_ {}; +struct xor_ {}; +struct less {}; +struct greater {}; +struct less_equal {}; +struct greater_equal {}; +struct equal_to {}; +struct not_equal_to {}; +struct subscript {}; +struct assign {}; +struct pre_increment {}; +struct pre_decrement {}; +struct negate {}; +struct not_ {}; +struct address {}; +struct dereference {}; +struct reinterpret_ {}; +struct static_ {}; +struct dynamic_ {}; + +template +struct lambda_action_deduce_result_type + { typedef typename type_trait::type type; }; // TODO: e.g. T_test1=int, T_test2=double yields int but it should yield double ! + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef bool type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef bool type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef T_test1 type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef T_test1 type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef typename type_trait::type>::pass type; }; + +template +struct lambda_action_unary_deduce_result_type + { typedef typename type_trait::type type; }; + +template +struct lambda_action_convert_deduce_result_type + { typedef typename type_trait::type type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef bool type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef typename type_trait::pointer type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef typename type_trait::type>::pass type; }; + +LAMBDA_OPERATOR(arithmetic,+)dnl +LAMBDA_OPERATOR(arithmetic,-)dnl +LAMBDA_OPERATOR(arithmetic,*)dnl +LAMBDA_OPERATOR(arithmetic,/)dnl +LAMBDA_OPERATOR(arithmetic,%)dnl +LAMBDA_OPERATOR(bitwise,<<)dnl +LAMBDA_OPERATOR(bitwise,>>)dnl +LAMBDA_OPERATOR(bitwise,&)dnl +LAMBDA_OPERATOR(bitwise,|)dnl +LAMBDA_OPERATOR(bitwise,^)dnl +LAMBDA_OPERATOR(logical,&&)dnl +LAMBDA_OPERATOR(logical,||)dnl +LAMBDA_OPERATOR(relational,<)dnl +LAMBDA_OPERATOR(relational,>)dnl +LAMBDA_OPERATOR(relational,<=)dnl +LAMBDA_OPERATOR(relational,>=)dnl +LAMBDA_OPERATOR(relational,==)dnl +LAMBDA_OPERATOR(relational,!=)dnl +LAMBDA_OPERATOR(arithmetic_assign,+=)dnl +LAMBDA_OPERATOR(arithmetic_assign,-=)dnl +LAMBDA_OPERATOR(arithmetic_assign,*=)dnl +LAMBDA_OPERATOR(arithmetic_assign,/=)dnl +LAMBDA_OPERATOR(arithmetic_assign,%=)dnl +LAMBDA_OPERATOR(bitwise_assign,<<=)dnl +LAMBDA_OPERATOR(bitwise_assign,>>=)dnl +LAMBDA_OPERATOR(bitwise_assign,&=)dnl +LAMBDA_OPERATOR(bitwise_assign,|=)dnl +LAMBDA_OPERATOR(bitwise_assign,^=)dnl +divert(1)dnl +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1[[_A_2]]; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 = _A_2; } +}; + +divert(0)dnl + +LAMBDA_OPERATOR_UNARY(unary_arithmetic,++)dnl +LAMBDA_OPERATOR_UNARY(unary_arithmetic,--)dnl +LAMBDA_OPERATOR_UNARY(unary_arithmetic,-)dnl +LAMBDA_OPERATOR_UNARY(unary_bitwise,~)dnl +LAMBDA_OPERATOR_UNARY(unary_logical,!)dnl +LAMBDA_OPERATOR_UNARY(unary_other
,&)dnl +LAMBDA_OPERATOR_UNARY(unary_other,*)dnl +LAMBDA_OPERATOR_CONVERT(cast_,reinterpret_cast)dnl +LAMBDA_OPERATOR_CONVERT(cast_,static_cast)dnl +LAMBDA_OPERATOR_CONVERT(cast_,dynamic_cast)dnl + +template +struct lambda_action {}; + +template +struct lambda_action_unary {}; + +template +struct lambda_action_convert {}; + +undivert(1) + +template +struct lambda_operator : public lambda_base +{ + typedef typename lambda::lambda_type arg1_type; + typedef typename lambda::lambda_type arg2_type; + + template + struct deduce_result_type + { typedef typename arg1_type::template deduce_result_type::type left_type; + typedef typename arg2_type::template deduce_result_type::type right_type; + typedef typename lambda_action_deduce_result_type::type type; + }; + typedef typename lambda_action_deduce_result_type< + T_action, + typename arg1_type::result_type, + typename arg2_type::result_type + >::type result_type; + + result_type + operator ()() const; + +FOR(1, CALL_SIZE,[[LAMBDA_OPERATOR_DO]](%1))dnl + lambda_operator(_R_(T_type1) a1, _R_(T_type2) a2 ) + : arg1_(a1), arg2_(a2) {} + + arg1_type arg1_; + arg2_type arg2_; +}; + +template +typename lambda_operator::result_type +lambda_operator::operator ()() const + { return lambda_action::template do_action< + typename arg1_type::result_type, + typename arg2_type::result_type> + (arg1_(), arg2_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator& _A_target) +{ + visit_each(_A_action, _A_target.arg1_); + visit_each(_A_action, _A_target.arg2_); +} + + +template +struct lambda_operator_unary : public lambda_base +{ + typedef typename lambda::lambda_type arg_type; + + template + struct deduce_result_type + { typedef typename arg_type::template deduce_result_type::type operand_type; + typedef typename lambda_action_unary_deduce_result_type::type type; + }; + typedef typename lambda_action_unary_deduce_result_type< + T_action, + typename arg_type::result_type + >::type result_type; + + result_type + operator ()() const; + +FOR(1, CALL_SIZE,[[LAMBDA_OPERATOR_UNARY_DO]](%1))dnl + lambda_operator_unary(_R_(T_type) a) + : arg_(a) {} + + arg_type arg_; +}; + +template +typename lambda_operator_unary::result_type +lambda_operator_unary::operator ()() const + { return lambda_action_unary::template do_action< + typename arg_type::result_type> + (arg_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator_unary& _A_target) +{ + visit_each(_A_action, _A_target.arg_); +} + + +template +struct lambda_operator_convert : public lambda_base +{ + typedef typename lambda::lambda_type arg_type; + + template + struct deduce_result_type + { typedef typename arg_type::template deduce_result_type::type operand_type; + typedef typename lambda_action_convert_deduce_result_type::type type; + }; + typedef typename lambda_action_convert_deduce_result_type< + T_action, T_type, + typename arg_type::result_type + >::type result_type; + + result_type + operator ()() const; + +FOR(1, CALL_SIZE,[[LAMBDA_OPERATOR_CONVERT_DO]](%1))dnl + lambda_operator_convert(_R_(T_arg) a) + : arg_(a) {} + + arg_type arg_; +}; + +template +typename lambda_operator_convert::result_type +lambda_operator_convert::operator ()() const + { return lambda_action_convert::template do_action< + typename arg_type::result_type> + (arg_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator_convert& _A_target) +{ + visit_each(_A_action, _A_target.arg_); +} + + +undivert(2)dnl + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_OPERATOR_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/macros/select.h.m4 b/libs/sigc++2/sigc++/adaptors/lambda/macros/select.h.m4 new file mode 100644 index 0000000000..8417bc68b5 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/macros/select.h.m4 @@ -0,0 +1,64 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +dnl +dnl Macros to make select arguments +define([LAMBDA_SELECT_DO],[dnl + template +dnl T_arg$1 operator ()(LOOP(T_arg%1 _A_%1, $2)) const { return _A_$1; } + T_arg$1 operator ()(LIST(FOR(1,eval($1-1),[T_arg%1,]),T_arg$1 _A_$1,FOR(eval($1+1),$2,[T_arg%1,]))) const { return _A_$1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg$1 sun_forte_workaround(LOOP(T_arg%1 _A_%1, $2)) const { return operator()( LOOP(_A_%1, $2) ); } + T_arg$1 sun_forte_workaround(LIST(FOR(1,eval($1-1),[T_arg%1,]),T_arg$1 _A_$1,FOR(eval($1+1),$2,[T_arg%1,]))) const { return _A_$1; } + #endif + +]) +define([LAMBDA_SELECT],[dnl +struct lambda_select$1 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg$1 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented +FOR($1, $2,[[LAMBDA_SELECT_DO($1,%1)]])dnl +}; + +]) + +divert(0)dnl +#ifndef _SIGC_LAMBDA_SELECT_HPP_ +#define _SIGC_LAMBDA_SELECT_HPP_ +#include + +namespace sigc { + +namespace internal { +FOR(1,CALL_SIZE,[[LAMBDA_SELECT(%1,CALL_SIZE)]]) +} /* namespace internal */ + +FOR(1,CALL_SIZE,[[extern SIGC_API const lambda _%1; +]]) + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_SELECT_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/operator.h b/libs/sigc++2/sigc++/adaptors/lambda/operator.h new file mode 100644 index 0000000000..ca74e6271f --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/operator.h @@ -0,0 +1,1700 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_LAMBDA_OPERATOR_HPP_ +#define _SIGC_LAMBDA_OPERATOR_HPP_ +#include + +namespace sigc { + +/** Deduces the base type of a reference or a pointer. + * @ingroup internal + */ +template +struct dereference_trait + { typedef void type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct dereference_trait + { typedef T_type type; }; + +template +struct dereference_trait + { typedef const T_type type; }; + +template +struct arithmetic {}; + +template +struct bitwise {}; + +template +struct logical {}; + +template +struct relational {}; + +template +struct arithmetic_assign {}; + +template +struct bitwise_assign {}; + +template +struct other {}; + +template +struct unary_arithmetic {}; + +template +struct unary_bitwise {}; + +template +struct unary_logical {}; + +template +struct unary_other {}; + +template +struct cast_ {}; + +struct plus {}; +struct minus {}; +struct multiplies {}; +struct divides {}; +struct modulus {}; +struct leftshift {}; +struct rightshift {}; +struct and_ {}; +struct or_ {}; +struct xor_ {}; +struct less {}; +struct greater {}; +struct less_equal {}; +struct greater_equal {}; +struct equal_to {}; +struct not_equal_to {}; +struct subscript {}; +struct assign {}; +struct pre_increment {}; +struct pre_decrement {}; +struct negate {}; +struct not_ {}; +struct address {}; +struct dereference {}; +struct reinterpret_ {}; +struct static_ {}; +struct dynamic_ {}; + +template +struct lambda_action_deduce_result_type + { typedef typename type_trait::type type; }; // TODO: e.g. T_test1=int, T_test2=double yields int but it should yield double ! + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef bool type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef bool type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef T_test1 type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef T_test1 type; }; + +template +struct lambda_action_deduce_result_type, T_test1, T_test2> + { typedef typename type_trait::type>::pass type; }; + +template +struct lambda_action_unary_deduce_result_type + { typedef typename type_trait::type type; }; + +template +struct lambda_action_convert_deduce_result_type + { typedef typename type_trait::type type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef bool type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef typename type_trait::pointer type; }; + +template +struct lambda_action_unary_deduce_result_type, T_test> + { typedef typename type_trait::type>::pass type; }; + + + +template +struct lambda_action {}; + +template +struct lambda_action_unary {}; + +template +struct lambda_action_convert {}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 + _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 - _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 * _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 / _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 % _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 << _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 >> _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 & _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 | _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 ^ _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 && _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 || _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 < _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 > _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 <= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 >= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 == _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 != _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 += _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 -= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 *= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 /= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 %= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 <<= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 >>= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 &= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 |= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 ^= _A_2; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1[_A_2]; } +}; + +template <> +struct lambda_action > +{ + template + static typename lambda_action_deduce_result_type, T_arg1, T_arg2>::type + do_action(T_arg1 _A_1, T_arg2 _A_2) + { return _A_1 = _A_2; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return ++_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return --_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return -_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return ~_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return !_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return &_Aa; } +}; + +template <> +struct lambda_action_unary > +{ + template + static typename lambda_action_unary_deduce_result_type, T_arg>::type + do_action(T_arg _Aa) + { return *_Aa; } +}; + +template +struct lambda_action_convert, T_type> +{ + template + static typename lambda_action_convert_deduce_result_type, T_type, T_arg>::type + do_action(T_arg _Aa) + { return reinterpret_cast(_Aa); } +}; + +template +struct lambda_action_convert, T_type> +{ + template + static typename lambda_action_convert_deduce_result_type, T_type, T_arg>::type + do_action(T_arg _Aa) + { return static_cast(_Aa); } +}; + +template +struct lambda_action_convert, T_type> +{ + template + static typename lambda_action_convert_deduce_result_type, T_type, T_arg>::type + do_action(T_arg _Aa) + { return dynamic_cast(_Aa); } +}; + + + +template +struct lambda_operator : public lambda_base +{ + typedef typename lambda::lambda_type arg1_type; + typedef typename lambda::lambda_type arg2_type; + + template + struct deduce_result_type + { typedef typename arg1_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type left_type; + typedef typename arg2_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type right_type; + typedef typename lambda_action_deduce_result_type::type type; + }; + typedef typename lambda_action_deduce_result_type< + T_action, + typename arg1_type::result_type, + typename arg2_type::result_type + >::type result_type; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass>::left_type, + typename deduce_result_type::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass>::left_type, + typename deduce_result_type::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::left_type, + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::right_type> + (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7), + arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + + lambda_operator(typename type_trait::take a1, typename type_trait::take a2 ) + : arg1_(a1), arg2_(a2) {} + + arg1_type arg1_; + arg2_type arg2_; +}; + +template +typename lambda_operator::result_type +lambda_operator::operator ()() const + { return lambda_action::template do_action< + typename arg1_type::result_type, + typename arg2_type::result_type> + (arg1_(), arg2_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator& _A_target) +{ + visit_each(_A_action, _A_target.arg1_); + visit_each(_A_action, _A_target.arg2_); +} + + +template +struct lambda_operator_unary : public lambda_base +{ + typedef typename lambda::lambda_type arg_type; + + template + struct deduce_result_type + { typedef typename arg_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type operand_type; + typedef typename lambda_action_unary_deduce_result_type::type type; + }; + typedef typename lambda_action_unary_deduce_result_type< + T_action, + typename arg_type::result_type + >::type result_type; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action_unary::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + #endif + + lambda_operator_unary(typename type_trait::take a) + : arg_(a) {} + + arg_type arg_; +}; + +template +typename lambda_operator_unary::result_type +lambda_operator_unary::operator ()() const + { return lambda_action_unary::template do_action< + typename arg_type::result_type> + (arg_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator_unary& _A_target) +{ + visit_each(_A_action, _A_target.arg_); +} + + +template +struct lambda_operator_convert : public lambda_base +{ + typedef typename lambda::lambda_type arg_type; + + template + struct deduce_result_type + { typedef typename arg_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type operand_type; + typedef typename lambda_action_convert_deduce_result_type::type type; + }; + typedef typename lambda_action_convert_deduce_result_type< + T_action, T_type, + typename arg_type::result_type + >::type result_type; + + result_type + operator ()() const; + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_1)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_1,_A_2)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); + } + #endif + + template + typename deduce_result_type::type + operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const + { + return lambda_action_convert::template do_action< + typename deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::operand_type> + (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); + } + #endif + + lambda_operator_convert(typename type_trait::take a) + : arg_(a) {} + + arg_type arg_; +}; + +template +typename lambda_operator_convert::result_type +lambda_operator_convert::operator ()() const + { return lambda_action_convert::template do_action< + typename arg_type::result_type> + (arg_()); } + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const lambda_operator_convert& _A_target) +{ + visit_each(_A_action, _A_target.arg_); +} + + +// Operators for lambda action arithmetic. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator + (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator + (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator + (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator - (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator - (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator - (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator * (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator * (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator * (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator / (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator / (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator / (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator % (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator % (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator % (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator << (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator << (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator << (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator >> (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator >> (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator >> (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator & (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator & (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator & (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator | (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator | (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator | (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator ^ (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator ^ (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator ^ (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action logical. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator && (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator && (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator && (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action logical. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator || (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator || (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator || (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator < (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator < (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator < (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator > (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator > (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator > (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator <= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator <= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator <= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator >= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator >= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator >= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator == (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator == (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator == (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action relational. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator != (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator != (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator != (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator += (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator += (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator += (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator -= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator -= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator -= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator *= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator *= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator *= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator /= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator /= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator /= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action arithmetic_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator %= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator %= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator %= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator <<= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator <<= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator <<= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator >>= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator >>= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator >>= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator &= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator &= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator &= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator |= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator |= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator |= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operators for lambda action bitwise_assign. At least one of the arguments needs to be of type lamdba, hence the overloads. +template +lambda, T_arg1, T_arg2> > +operator ^= (const lambda& a1, const lambda& a2) +{ typedef lambda_operator, T_arg1, T_arg2> operator_type; + return lambda(operator_type(a1.value_,a2.value_)); } +template +lambda, T_arg1, typename unwrap_reference::type> > +operator ^= (const lambda& a1, const T_arg2& a2) +{ typedef lambda_operator, T_arg1, typename unwrap_reference::type> operator_type; + return lambda(operator_type(a1.value_,a2)); } +template +lambda, typename unwrap_reference::type, T_arg2> > +operator ^= (const T_arg1& a1, const lambda& a2) +{ typedef lambda_operator, typename unwrap_reference::type, T_arg2> operator_type; + return lambda(operator_type(a1,a2.value_)); } + +// Operator for lambda action unary_arithmetic. +template +lambda, T_arg> > +operator ++ (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_arithmetic. +template +lambda, T_arg> > +operator -- (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_arithmetic. +template +lambda, T_arg> > +operator - (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_bitwise. +template +lambda, T_arg> > +operator ~ (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_logical. +template +lambda, T_arg> > +operator ! (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_other
. +template +lambda, T_arg> > +operator & (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Operator for lambda action unary_other. +template +lambda, T_arg> > +operator * (const lambda& a) +{ typedef lambda_operator_unary, T_arg> operator_type; + return lambda(operator_type(a.value_)); } + +// Creators for lambda action cast_. +template +lambda, T_type, typename unwrap_lambda_type::type> > +reinterpret_cast_(const T_arg& a) +{ typedef lambda_operator_convert, T_type, typename unwrap_lambda_type::type> operator_type; + return lambda(operator_type(unwrap_lambda_value(a))); } + +// Creators for lambda action cast_. +template +lambda, T_type, typename unwrap_lambda_type::type> > +static_cast_(const T_arg& a) +{ typedef lambda_operator_convert, T_type, typename unwrap_lambda_type::type> operator_type; + return lambda(operator_type(unwrap_lambda_value(a))); } + +// Creators for lambda action cast_. +template +lambda, T_type, typename unwrap_lambda_type::type> > +dynamic_cast_(const T_arg& a) +{ typedef lambda_operator_convert, T_type, typename unwrap_lambda_type::type> operator_type; + return lambda(operator_type(unwrap_lambda_value(a))); } + + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_OPERATOR_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/lambda/select.h b/libs/sigc++2/sigc++/adaptors/lambda/select.h new file mode 100644 index 0000000000..2fbe97b626 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/lambda/select.h @@ -0,0 +1,346 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_LAMBDA_SELECT_HPP_ +#define _SIGC_LAMBDA_SELECT_HPP_ +#include + +namespace sigc { + +namespace internal { +struct lambda_select1 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg1 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg1 operator ()(T_arg1 _A_1) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1) const { return operator()( _A_1 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return operator()( _A_1,_A_2 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2, T_arg3) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2, T_arg3) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2, T_arg3, T_arg4) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2, T_arg3, T_arg4) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6) const { return _A_1; } + #endif + + template + T_arg1 operator ()(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_1; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg1 sun_forte_workaround(T_arg1 _A_1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_1; } + #endif + +}; + +struct lambda_select2 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg2 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return operator()( _A_1,_A_2 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2) const { return _A_2; } + #endif + + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2, T_arg3) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2, T_arg3) const { return _A_2; } + #endif + + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2, T_arg3, T_arg4) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2, T_arg3, T_arg4) const { return _A_2; } + #endif + + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5) const { return _A_2; } + #endif + + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5, T_arg6) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5, T_arg6) const { return _A_2; } + #endif + + template + T_arg2 operator ()(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_2; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg2 sun_forte_workaround(T_arg1, T_arg2 _A_2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_2; } + #endif + +}; + +struct lambda_select3 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg3 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg3 operator ()(T_arg1, T_arg2, T_arg3 _A_3) const { return _A_3; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); } + T_arg3 sun_forte_workaround(T_arg1, T_arg2, T_arg3 _A_3) const { return _A_3; } + #endif + + template + T_arg3 operator ()(T_arg1, T_arg2, T_arg3 _A_3, T_arg4) const { return _A_3; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); } + T_arg3 sun_forte_workaround(T_arg1, T_arg2, T_arg3 _A_3, T_arg4) const { return _A_3; } + #endif + + template + T_arg3 operator ()(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5) const { return _A_3; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); } + T_arg3 sun_forte_workaround(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5) const { return _A_3; } + #endif + + template + T_arg3 operator ()(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5, T_arg6) const { return _A_3; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg3 sun_forte_workaround(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5, T_arg6) const { return _A_3; } + #endif + + template + T_arg3 operator ()(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_3; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg3 sun_forte_workaround(T_arg1, T_arg2, T_arg3 _A_3, T_arg4, T_arg5, T_arg6, T_arg7) const { return _A_3; } + #endif + +}; + +struct lambda_select4 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg4 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg4 operator ()(T_arg1, T_arg2, T_arg3, T_arg4 _A_4) const { return _A_4; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); } + T_arg4 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4 _A_4) const { return _A_4; } + #endif + + template + T_arg4 operator ()(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5) const { return _A_4; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); } + T_arg4 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5) const { return _A_4; } + #endif + + template + T_arg4 operator ()(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5, T_arg6) const { return _A_4; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg4 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5, T_arg6) const { return _A_4; } + #endif + + template + T_arg4 operator ()(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5, T_arg6, T_arg7) const { return _A_4; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg4 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4 _A_4, T_arg5, T_arg6, T_arg7) const { return _A_4; } + #endif + +}; + +struct lambda_select5 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg5 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg5 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5) const { return _A_5; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); } + T_arg5 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5) const { return _A_5; } + #endif + + template + T_arg5 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5, T_arg6) const { return _A_5; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg5 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5, T_arg6) const { return _A_5; } + #endif + + template + T_arg5 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5, T_arg6, T_arg7) const { return _A_5; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg5 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 _A_5, T_arg6, T_arg7) const { return _A_5; } + #endif + +}; + +struct lambda_select6 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg6 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg6 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 _A_6) const { return _A_6; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); } + T_arg6 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 _A_6) const { return _A_6; } + #endif + + template + T_arg6 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 _A_6, T_arg7) const { return _A_6; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg6 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 _A_6, T_arg7) const { return _A_6; } + #endif + +}; + +struct lambda_select7 : public lambda_base +{ + template + struct deduce_result_type + { typedef T_arg7 type; }; + typedef void result_type; // no operator ()() overload + + void operator ()() const; // not implemented + template + T_arg7 operator ()(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 _A_7) const { return _A_7; } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + //Does not work: T_arg7 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); } + T_arg7 sun_forte_workaround(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 _A_7) const { return _A_7; } + #endif + +}; + + +} /* namespace internal */ + +extern SIGC_API const lambda _1; +extern SIGC_API const lambda _2; +extern SIGC_API const lambda _3; +extern SIGC_API const lambda _4; +extern SIGC_API const lambda _5; +extern SIGC_API const lambda _6; +extern SIGC_API const lambda _7; + + +} /* namespace sigc */ + +#endif /* _SIGC_LAMBDA_SELECT_HPP_ */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/adaptor_trait.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/adaptor_trait.h.m4 new file mode 100644 index 0000000000..4c73de3425 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/adaptor_trait.h.m4 @@ -0,0 +1,288 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +dnl +dnl The idea here is simple. To prevent the need to +dnl specializing every adaptor for every type of functor +dnl and worse non-functors like function pointers, we +dnl will make an adaptor trait which can take ordinary +dnl functors and make them adaptor functors for which +dnl we will of course be able to avoid excess copies. +dnl (in theory) +dnl +dnl this all depends on partial specialization to allow +dnl us to do +dnl functor_.template operator() (args); +dnl + +dnl I don't understand much of the above. However, I can +dnl see that adaptors are implemented like they are because +dnl there is no way to extract the return type and the argument +dnl types from a functor type. Therefore, operator() is templated. +dnl It's instatiated in slot_call#<>::operator() where the +dnl argument types are known. The return type is finally determined +dnl via the callof<> template - a tricky way to detect the return +dnl type of a functor when the argument types are known. Martin. + +]) +define([ADAPTOR_DO],[dnl +ifelse($1,0,[dnl +dnl typename internal::callof_safe0::result_type // doesn't compile if T_functor has an overloaded operator()! +dnl typename functor_trait::result_type +dnl operator()() const +dnl { return functor_(); } +],[dnl + /** Invokes the wrapped functor passing on the arguments.dnl +FOR(1, $1,[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_arg%1, $1)) const + { return functor_(LOOP(_A_arg%1, $1)); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_arg%1, $1)) const + { //Just calling operator() tries to copy the argument: + return functor_(LOOP(_A_arg%1, $1)); + } + #endif + +])dnl +]) + +divert(0)dnl +__FIREWALL__ +#include //To get SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD +#include +#include +#include +#include +#include + +namespace sigc { + +// Call either operator()<>() or sun_forte_workaround<>(), +// depending on the compiler: +#ifdef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES template operator() + #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD +#else + #ifdef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES operator() + #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #else + #define SIGC_WORKAROUND_OPERATOR_PARENTHESES sun_forte_workaround + #endif +#endif + + +template struct adapts; + +/** @defgroup adaptors Adaptors + * Adaptors are functors that alter the signature of a functor's + * operator()(). + * + * The adaptor types libsigc++ provides + * are created with bind(), bind_return(), hide(), hide_return(), + * retype_return(), retype(), compose(), exception_catch() and group(). + * + * You can easily derive your own adaptor type from sigc::adapts. + */ + +/** Converts an arbitrary functor into an adaptor type. + * All adaptor tyes in libsigc++ are unnumbered and have + * a template operator() member of every argument count + * they support. These functions in turn invoke a stored adaptor's + * template operator() processing the arguments and return + * value in a characteristic manner. Explicit function template + * instantiation is used to pass type hints thus saving copy costs. + * + * adaptor_functor is a glue between adaptors and arbitrary functors + * that just passes on the arguments. You won't use this type directly. + * + * The template argument @e T_functor determines the type of stored + * functor. + * + * @ingroup adaptors + */ +template +struct adaptor_functor : public adaptor_base +{ + template + struct deduce_result_type + { typedef typename sigc::deduce_result_type::type type; }; + typedef typename functor_trait::result_type result_type; + + /** Invokes the wrapped functor passing on the arguments. + * @return The return value of the functor invocation. + */ + result_type + operator()() const; + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + result_type sun_forte_workaround() const + { return operator(); } + #endif + +FOR(0,CALL_SIZE,[[ADAPTOR_DO(%1)]])dnl + /// Constructs an invalid functor. + adaptor_functor() + {} + + /** Constructs an adaptor_functor object that wraps the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit adaptor_functor(const T_functor& _A_functor) + : functor_(_A_functor) + {} + + /** Constructs an adaptor_functor object that wraps the passed (member) + * function pointer. + * @param _A_type Pointer to function or class method to invoke from operator()(). + */ + template + explicit adaptor_functor(const T_type& _A_type) + : functor_(_A_type) + {} + + /// Functor that is invoked from operator()(). + mutable T_functor functor_; +}; + +template +typename adaptor_functor::result_type +adaptor_functor::operator()() const + { return functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::adaptor_functor performs a functor + * on the functor stored in the sigc::adaptor_functor object. + * + * @ingroup adaptors + */ +template +void visit_each(const T_action& _A_action, + const adaptor_functor& _A_target) +{ + //The extra sigc:: prefix avoids ambiguity in some strange + //situations. + sigc::visit_each(_A_action, _A_target.functor_); +} + + +/** Trait that specifies what is the adaptor version of a functor type. + * Template specializations for sigc::adaptor_base derived functors, + * for function pointers and for class methods are provided. + * + * The template argument @e T_functor is the functor type to convert. + * @e I_isadaptor indicates whether @e T_functor inherits from sigc::adaptor_base. + * + * @ingroup adaptors + */ +template ::value> struct adaptor_trait; + +/** Trait that specifies what is the adaptor version of a functor type. + * This template specialization is used for types that inherit from adaptor_base. + * adaptor_type is equal to @p T_functor in this case. + */ +template +struct adaptor_trait +{ + typedef typename T_functor::result_type result_type; + typedef T_functor functor_type; + typedef T_functor adaptor_type; +}; + +/** Trait that specifies what is the adaptor version of a functor type. + * This template specialization is used for arbitrary functors, + * for function pointers and for class methods are provided. + * The latter are converted into @p pointer_functor or @p mem_functor types. + * adaptor_type is equal to @p adaptor_functor. + */ +template +struct adaptor_trait +{ + typedef typename functor_trait::result_type result_type; + typedef typename functor_trait::functor_type functor_type; + typedef adaptor_functor adaptor_type; +}; + + +/** Base type for adaptors. + * adapts wraps adaptors, functors, function pointers and class methods. + * It contains a single member functor which is always a sigc::adaptor_base. + * The typedef adaptor_type defines the exact type that is used + * to store the adaptor, functor, function pointer or class method passed + * into the constructor. It differs from @e T_functor unless @e T_functor + * inherits from sigc::adaptor_base. + * + * @par Example of a simple adaptor: + * @code + * template + * struct my_adpator : public sigc::adapts + * { + * template + * struct deduce_result_type + * { typedef typename sigc::deduce_result_type::type type; }; + * typedef typename sigc::functor_trait::result_type result_type; + * + * result_type + * operator()() const; + * + * template + * typename deduce_result_type::type + * operator()(T_arg1 _A_arg1) const; + * + * template + * typename deduce_result_type::type + * operator()(T_arg1 _A_arg1, class T_arg2) const; + * + * explicit adaptor_functor(const T_functor& _A_functor) // Constructs a my_functor object that wraps the passed functor. + * : sigc::adapts(_A_functor) {} + * + * mutable T_functor functor_; // Functor that is invoked from operator()(). + * }; + * @endcode + * + * @ingroup adaptors + */ +template +struct adapts : public adaptor_base +{ + typedef typename adaptor_trait::result_type result_type; + typedef typename adaptor_trait::adaptor_type adaptor_type; + + /** Constructs an adaptor that wraps the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit adapts(const T_functor& _A_functor) + : functor_(_A_functor) + {} + + /// Adaptor that is invoked from operator()(). + mutable adaptor_type functor_; +}; + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/bind.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/bind.h.m4 new file mode 100644 index 0000000000..c38e6faaa4 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/bind.h.m4 @@ -0,0 +1,377 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([DEDUCE_RESULT_TYPE_COUNT],[dnl + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::type), $1))>::type type; }; +]) +define([BIND_OPERATOR_LOCATION],[dnl +ifelse($2,1,,[dnl + /** Invokes the wrapped functor passing on the arguments. + * bound_ is passed as the $1[]th argument.dnl +FOR(1, eval($2-1),[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_arg%1,eval($2-1))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type), FOR($1,eval($2-1),[_P_(T_arg%1),]))> + (LIST(LOOP(_A_arg%1,eval($1-1)), bound_.invoke(), FOR($1,eval($2-1),[_A_arg%1,]))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_arg%1,eval($2-1))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type), FOR($1,eval($2-1),[_P_(T_arg%1),]))> + (LIST(LOOP(_A_arg%1,eval($1-1)), bound_.invoke(), FOR($1,eval($2-1),[_A_arg%1,]))); + } + #endif + +])dnl +]) +define([BIND_OPERATOR_COUNT],[dnl + /** Invokes the wrapped functor passing on the arguments. + * The last $1 argument(s) are fixed.dnl +FOR(1, eval($2-1),[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_arg%1, eval($2-1))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type), $1))> + (LIST(LOOP(_A_arg%1,eval($2-1)), LOOP(bound%1_.invoke(), $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_arg%1, eval($2-1))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type), $1))> + (LIST(LOOP(_A_arg%1,eval($2-1)), LOOP(bound%1_.invoke(), $1))); + } + #endif + +]) +define([BIND_FUNCTOR_LOCATION],[dnl +/** Adaptor that binds an argument to the wrapped functor. + * This template specialization fixes the eval($1+1)[]th argument of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor<$1, T_functor, T_bound, LIST(LOOP(nil, CALL_SIZE - 1))> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::type), FOR(eval($1+1),eval(CALL_SIZE-1),[_P_(T_arg%1),]))>::type type; }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<_P_(typename unwrap_reference::type)> (bound_.invoke()); + } + +FOR(eval($1+1),CALL_SIZE,[[BIND_OPERATOR_LOCATION(eval($1+1),%1)]])dnl + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(_R_(T_functor) _A_func, _R_(T_bound) _A_bound) + : adapts(_A_func), bound_(_A_bound) + {} + + /// The argument bound to the functor. + bound_argument bound_; +}; + +]) +define([BIND_FUNCTOR_COUNT],[dnl +/** Adaptor that binds $1 argument(s) to the wrapped functor. + * This template specialization fixes the last $1 argument(s) of the wrapped functor. + * + * @ingroup bind + */ +template +struct bind_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template + struct deduce_result_type_internal + { typedef typename adaptor_type::template deduce_result_type::type), $1))>::type type; }; +FOR(eval($1+1),eval(CALL_SIZE-1),[[DEDUCE_RESULT_TYPE_COUNT($1,%1)]])dnl +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + template + struct deduce_result_type { + typedef typename deduce_result_type_internal::value, + LOOP(T_arg%1, eval(CALL_SIZE))>::type type; + }; + typedef typename adaptor_type::result_type result_type; + + /** Invokes the wrapped functor passing on the bound argument only. + * @return The return value of the functor invocation. + */ + result_type + operator()() + { + //Note: The AIX compiler sometimes gives linker errors if we do not define this in the class. + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type), $1)> (LOOP(bound%1_.invoke(), $1)); + } + +FOR(2,eval(CALL_SIZE-$1+1),[[BIND_OPERATOR_COUNT($1,%1)]])dnl + /** Constructs a bind_functor object that binds an argument to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_bound Argument to bind to the functor. + */ + bind_functor(_R_(T_functor) _A_func, LOOP(_R_(T_type%1) _A_bound%1, $1)) + : adapts(_A_func), LOOP(bound%1_(_A_bound%1), $1) + {} + + /// The argument bound to the functor.dnl +FOR(1,$1,[ + bound_argument bound%1_;]) +}; + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor<-1, T_functor, LOOP(T_type%1, $1)>& _A_target) +{ + visit_each(_A_action, _A_target.functor_);dnl +FOR(1,$1,[ + visit_each(_A_action, _A_target.bound%1_);]) +} + +]) +define([BIND_COUNT],[dnl +/** Creates an adaptor of type sigc::bind_functor which fixes the last $1 argument(s) of the passed functor. + * This function overload fixes the last $1 argument(s) of @e _A_func. + * + * @param _A_func Functor that should be wrapped.dnl +FOR(1,$1,[ + * @param _A_b%1 Argument to bind to @e _A_func.]) + * @return Adaptor that executes _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor<-1, T_functor,dnl +FOR(1,eval($1-1),[ + T_type%1,]) + T_type$1> +bind(const T_functor& _A_func, LOOP(T_type%1 _A_b%1, $1)) +{ return bind_functor<-1, T_functor,dnl +FOR(1,eval($1-1),[ + T_type%1,]) + T_type$1> + (_A_func, LOOP(_A_b%1, $1)); +} + +]) + +divert(0)dnl +__FIREWALL__ +#include +#include + +namespace sigc { + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +namespace internal { + +template +struct count_void + { static const int value=0; }; +template +struct count_void + { static const int value=1; }; +template +struct count_void + { static const int value=2; }; +template +struct count_void + { static const int value=3; }; +template +struct count_void + { static const int value=4; }; +template +struct count_void + { static const int value=5; }; +template +struct count_void + { static const int value=6; }; +template <> +struct count_void + { static const int value=7; }; + +} /* namespace internal */ + +#endif /*DOXYGEN_SHOULD_SKIP_THIS*/ + + +/** @defgroup bind bind(), bind_return() + * sigc::bind() alters an arbitrary functor by fixing arguments to certain values. + * Up to CALL_SIZE arguments can be bound at a time. + * For single argument binding overloads of sigc::bind() are provided that let you + * specify the zero-based position of the argument to fix with the first template parameter. + * (A value of @p -1 fixes the last argument so sigc::bind<-1>() gives the same result as sigc::bind().) + * The types of the arguments can optionally be specified if not deduced. + * + * @par Examples: + * @code + * void foo(int, int, int); + * // single argument binding ... + * sigc::bind(&foo,1)(2,3); //fixes the last (third) argument and calls foo(2,3,1) + * sigc::bind<-1>(&foo,1)(2,3); //same as bind(&foo,1)(2,3) (calls foo(2,3,1)) + * sigc::bind<0>(&foo,1)(2,3); //fixes the first argument and calls foo(1,2,3) + * sigc::bind<1>(&foo,1)(2,3); //fixes the second argument and calls foo(2,1,3) + * sigc::bind<2>(&foo,1)(2,3); //fixes the third argument and calls foo(2,3,1) + * // multi argument binding ... + * sigc::bind(&foo,1,2)(3); //fixes the last two arguments and calls foo(3,1,2) + * sigc::bind(&foo,1,2,3)(); //fixes all three arguments and calls foo(1,2,3) + * @endcode + * + * The functor sigc::bind() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::bind(&foo,1)); + * @endcode + * + * sigc::bind_return() alters an arbitrary functor by + * fixing its return value to a certain value. + * + * @par Example: + * @code + * void foo(); + * std::cout << sigc::bind_return(&foo, 5)(); // calls foo() and returns 5 + * @endcode + * + * You can bind references to functors by passing the objects through + * the sigc::ref() helper function. + * + * @par Example: + * @code + * int some_int; + * sigc::signal some_signal; + * void foo(int&); + * some_signal.connect(sigc::bind(&foo,sigc::ref(some_int))); + * @endcode + * + * If you bind an object of a sigc::trackable derived type to a functor + * by reference, a slot assigned to the bind adaptor is cleared automatically + * when the object goes out of scope. + * + * @par Example: + * @code + * struct bar : public sigc::trackable {} some_bar; + * sigc::signal some_signal; + * void foo(bar&); + * some_signal.connect(sigc::bind(&foo,sigc::ref(some_bar))); + * // disconnected automatically if some_bar goes out of scope + * @endcode + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::bind() provides a means of binding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that binds an argument to the wrapped functor. + * Use the convenience function sigc::bind() to create an instance of sigc::bind_functor. + * + * The following template arguments are used: + * - @e I_location Zero-based position of the argument to fix (@p -1 for the last argument). +FOR(1, CALL_SIZE,[ + * - @e T_type%1 Type of the %1st bound argument.]) + * - @e T_functor Type of the functor to wrap. + * + * @ingroup bind + */ +template +struct bind_functor; + +FOR(0,eval(CALL_SIZE-1),[[BIND_FUNCTOR_LOCATION(%1)]])dnl + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_functor performs a functor on the + * functor and on the object instances stored in the sigc::bind_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.bound_); +} + +FOR(1,CALL_SIZE,[[BIND_FUNCTOR_COUNT(%1)]])dnl + +/** Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor. + * The optional template argument @e I_location specifies the zero-based + * position of the argument to be fixed (@p -1 stands for the last argument). + * + * @param _A_func Functor that should be wrapped. + * @param _A_b1 Argument to bind to @e _A_func. + * @return Adaptor that executes @e _A_func with the bound argument on invokation. + * + * @ingroup bind + */ +template +inline bind_functor +bind(const T_functor& _A_func, T_bound1 _A_b1) +{ + return bind_functor + (_A_func, _A_b1); +} + +FOR(1,CALL_SIZE,[[BIND_COUNT(%1)]])dnl + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/bind_return.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/bind_return.h.m4 new file mode 100644 index 0000000000..6a6d8acdda --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/bind_return.h.m4 @@ -0,0 +1,120 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([BIND_RETURN_OPERATOR],[dnl + /** Invokes the wrapped functor passing on the arguments.dnl +FOR(1, $1),[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @return The fixed return value. + */ + template + inline typename unwrap_reference::type operator()(LOOP(T_arg%1 _A_a%1, $1)) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1)); return ret_value_.invoke(); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline typename unwrap_reference::type sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1)); return ret_value_.invoke(); + } + #endif + +]) + +divert(0)dnl +__FIREWALL__ +#include +#include + +namespace sigc { + +/** Adaptor that fixes the return value of the wrapped functor. + * Use the convenience function sigc::bind_return() to create an instance of sigc::bind_return_functor. + * + * The following template arguments are used: + * - @e T_return Type of the fixed return value. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup bind + */ +template +struct bind_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef typename unwrap_reference::type type; }; + typedef typename unwrap_reference::type result_type; + + /** Invokes the wrapped functor dropping its return value. + * @return The fixed return value. + */ + typename unwrap_reference::type operator()(); + +FOR(1,CALL_SIZE,[[BIND_RETURN_OPERATOR(%1)]])dnl + + /** Constructs a bind_return_functor object that fixes the return value to @p _A_ret_value. + * @param _A_functor Functor to invoke from operator()(). + * @param _A_ret_value Value to return from operator()(). + */ + bind_return_functor(_R_(T_functor) _A_functor, _R_(T_return) _A_ret_value) + : adapts(_A_functor), ret_value_(_A_ret_value) + {} + + /// The fixed return value. + bound_argument ret_value_; // public, so that visit_each() can access it +}; + +template +typename unwrap_reference::type bind_return_functor::operator()() + { this->functor_(); return ret_value_.invoke(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bind_return_functor performs a functor on the + * functor and on the object instance stored in the sigc::bind_return_functor object. + * + * @ingroup bind + */ +template +void visit_each(const T_action& _A_action, + const bind_return_functor& _A_target) +{ + visit_each(_A_action, _A_target.ret_value_); + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument. + * + * @param _A_functor Functor that should be wrapped. + * @param _A_ret_value Argument to fix the return value of @e _A_functor to. + * @return Adaptor that executes @e _A_functor on invokation and returns @e _A_ret_value. + * + * @ingroup bind + */ +template +inline bind_return_functor +bind_return(const T_functor& _A_functor, T_return _A_ret_value) +{ return bind_return_functor(_A_functor, _A_ret_value); } + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/compose.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/compose.h.m4 new file mode 100644 index 0000000000..17ad8952dc --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/compose.h.m4 @@ -0,0 +1,248 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([COMPOSE1_OPERATOR],[dnl + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_a%1, $1)) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type> + (get_(LOOP(_A_a%1, $1))); + } + +]) + +define([COMPOSE2_OPERATOR],[dnl + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_a%1, $1)) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::type, + typename sigc::deduce_result_type::type> + (get1_(LOOP(_A_a%1, $1)), get2_(LOOP(_A_a%1,$1))); + } + +]) + +divert(0) +__FIREWALL__ +#include + +namespace sigc { + +/** @defgroup compose compose() + * sigc::compose() combines two or three arbitrary functors. + * On invokation parameters are passed on to one or two getter functor(s). + * The return value(s) are then passed on to the setter function. + * + * @par Examples: + * @code + * float square_root(float a) { return sqrtf(a); } + * float sum(float a, float b) { return a+b; } + * std::cout << sigc::compose(&square_root, &sum)(9, 16); // calls square_root(sum(3,6)) + * std::cout << sigc::compose(&sum, &square_root, &square_root)(9); // calls sum(square_root(9), square_root(9)) + * @endcode + * + * The functor sigc::compose() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * some_signal.connect(sigc::compose(&square_root, &sum)); + * @endcode + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::bind() provides a means of binding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that combines two functors. + * Use the convenience function sigc::compose() to create an instance of sigc::compose1_functor. + * + * The following template arguments are used: + * - @e T_setter Type of the setter functor to wrap. + * - @e T_getter Type of the getter functor to wrap. + * + * @ingroup compose + */ +template +struct compose1_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + typedef T_setter setter_type; + typedef T_getter getter_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type< + typename sigc::deduce_result_type::type + >::type type; }; + typedef typename adaptor_type::result_type result_type; + + result_type + operator()(); + +FOR(1,CALL_SIZE, [[COMPOSE1_OPERATOR(%1)]])dnl + + /** Constructs a compose1_functor object that combines the passed functors. + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + */ + compose1_functor(const T_setter& _A_setter, const T_getter& _A_getter) + : adapts(_A_setter), get_(_A_getter) + {} + + getter_type get_; // public, so that visit_each() can access it +}; + +template +typename compose1_functor::result_type +compose1_functor::operator()() + { return this->functor_(get_()); } + +/** Adaptor that combines three functors. + * Use the convenience function sigc::compose() to create an instance of sigc::compose2_functor. + * + * The following template arguments are used: + * - @e T_setter Type of the setter functor to wrap. + * - @e T_getter1 Type of the first getter functor to wrap. + * - @e T_getter2 Type of the second getter functor to wrap. + * + * @ingroup compose + */ +template +struct compose2_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + typedef T_setter setter_type; + typedef T_getter1 getter1_type; + typedef T_getter2 getter2_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type< + typename sigc::deduce_result_type::type, + typename sigc::deduce_result_type::type + >::type result_type; }; + typedef typename adaptor_type::result_type result_type; + + result_type + operator()(); + +FOR(1,CALL_SIZE,[[COMPOSE2_OPERATOR(%1)]])dnl + + /** Constructs a compose2_functor object that combines the passed functors. + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + */ + compose2_functor(const T_setter& _A_setter, + const T_getter1& _A_getter1, + const T_getter2& _A_getter2) + : adapts(_A_setter), get1_(_A_getter1), get2_(_A_getter2) + {} + + getter1_type get1_; // public, so that visit_each() can access it + getter2_type get2_; // public, so that visit_each() can access it +}; + +template +typename compose2_functor::result_type +compose2_functor::operator()() + { return this->functor_(get1_(), get2_()); } + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::compose1_functor performs a functor on the + * functors stored in the sigc::compose1_functor object. + * + * @ingroup compose + */ +template +void visit_each(const T_action& _A_action, + const compose1_functor& _A_target) +{ + typedef compose1_functor type_functor; + + //Note that the AIX compiler needs the actual template types of visit_each to be specified: + typedef typename type_functor::setter_type type_functor1; + visit_each(_A_action, _A_target.functor_); + + typedef typename type_functor::getter_type type_functor_getter; + visit_each(_A_action, _A_target.get_); +} + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::compose2_functor performs a functor on the + * functors stored in the sigc::compose2_functor object. + * + * @ingroup compose + */ +template +void visit_each(const T_action& _A_action, + const compose2_functor& _A_target) +{ + typedef compose2_functor type_functor; + + //Note that the AIX compiler needs the actual template types of visit_each to be specified: + typedef typename type_functor::setter_type type_functor1; + visit_each(_A_action, _A_target.functor_); + + typedef typename type_functor::getter1_type type_functor_getter1; + visit_each(_A_action, _A_target.get1_); + + typedef typename type_functor::getter2_type type_functor_getter2; + visit_each(_A_action, _A_target.get2_); +} + + +/** Creates an adaptor of type sigc::compose1_functor which combines two functors. + * + * @param _A_setter Functor that receives the return value of the invokation of @e _A_getter. + * @param _A_getter Functor to invoke from operator()(). + * @return Adaptor that executes @e _A_setter with the value returned from invokation of @e _A_getter. + * + * @ingroup compose + */ +template +inline compose1_functor +compose(const T_setter& _A_setter, const T_getter& _A_getter) + { return compose1_functor(_A_setter, _A_getter); } + +/** Creates an adaptor of type sigc::compose2_functor which combines three functors. + * + * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2. + * @param _A_getter1 Functor to invoke from operator()(). + * @param _A_getter2 Functor to invoke from operator()(). + * @return Adaptor that executes @e _A_setter with the values return from invokation of @e _A_getter1 and @e _A_getter2. + * + * @ingroup compose + */ +template +inline compose2_functor +compose(const T_setter& _A_setter, const T_getter1& _A_getter1, const T_getter2& _A_getter2) + { return compose2_functor(_A_setter, _A_getter1, _A_getter2); } + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/deduce_result_type.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/deduce_result_type.h.m4 new file mode 100644 index 0000000000..531906bef2 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/deduce_result_type.h.m4 @@ -0,0 +1,100 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +define([DEDUCE_RESULT_TYPE_ADAPTOR],[dnl +/** Deduce the return type of a functor. + * This is the template specialization of the sigc::deduce_result_type template + * for $1 arguments. + */ +template +struct deduce_result_type + { typedef typename T_functor::template deduce_result_type::type type; }; + +]) +dnl 01.11.2003: Completely removed support for typeof() since it is non-standard! +dnl define([DEDUCE_RESULT_TYPE_TYPEOF],[dnl +dnl template +dnl struct deduce_result_type +dnl { +dnl typedef typeof(type_trait::instance(). +dnl T_functor::operator()(LOOP([ +dnl type_trait::instance()], $1))) type; +dnl }; +dnl +dnl ]) + +divert(0)dnl +/* +*/ +__FIREWALL__ +#include + + +namespace sigc { + +/** A hint to the compiler. + * Functors which have all methods based on templates + * should publicly inherit from this hint and define + * a nested template class @p deduce_result_type that + * can be used to deduce the methods' return types. + * + * adaptor_base inherits from the functor_base hint so + * derived types should also have a result_type defined. + * + * Adaptors don't inherit from this type directly. They use + * use sigc::adapts as a base type instead. sigc::adaptors + * wraps arbitrary functor types as well as function pointers + * and class methods. + * + * @ingroup adaptors + */ +struct adaptor_base : public functor_base {}; + + +/** Deduce the return type of a functor. + * typename deduce_result_type::type + * deduces a functor's result type if @p functor_type inherits from + * sigc::functor_base and defines @p result_type or if @p functor_type + * is actually a (member) function type. Multi-type functors are not + * supported. + * + * sigc++ adaptors use + * typename deduce_result_type::type + * to determine the return type of their templated operator() overloads. + * + * Adaptors in turn define a nested template class @p deduce_result_type + * that is used by template specializations of the global deduce_result_type + * template to correctly deduce the return types of the adaptor's suitable + * template operator() overload. + * + * @ingroup adaptors + */ +template ::value> +struct deduce_result_type + { typedef typename functor_trait::result_type type; }; + +FOR(0,CALL_SIZE,[[DEDUCE_RESULT_TYPE_ADAPTOR(%1,CALL_SIZE)]])dnl + +dnl #ifdef SIGC_CXX_TYPEOF +dnl FOR(0,CALL_SIZE,[[DEDUCE_RESULT_TYPE_TYPEOF(%1,CALL_SIZE)]]) +dnl #endif +dnl +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/exception_catch.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/exception_catch.h.m4 new file mode 100644 index 0000000000..028503a667 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/exception_catch.h.m4 @@ -0,0 +1,171 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([EXCEPTION_CATCH_OPERATOR],[dnl + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_a%1, $1)) + { + try + { + return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1)); + } + catch (...) + { return catcher_(); } + } + +]) + +divert(0)dnl +__FIREWALL__ +#include + +namespace sigc { + +/* + functor adaptor: exception_catch(functor, catcher) + + usage: + + + Future directions: + The catcher should be told what type of return it needs to + return for multiple type functors, to do this the user + will need to derive from catcher_base. +*/ +/** @defgroup exception_catch exception_catch() + * sigc::exception_catch() catches an exception thrown from within + * the wrapped functor and directs it to a catcher functor. + * This catcher can then rethrow the exception and catch it with the proper type. + * + * Note that the catcher is expected to return the same type + * as the wrapped functor so that normal flow can continue. + * + * Catchers can be cascaded to catch multiple types because uncaught + * rethrown exceptions proceed to the next catcher adaptor. + * + * @par Examples: + * @code + * struct my_catch + * { + * int operator()() + * { + * try { throw; } + * catch (std::range_error e) // catch what types we know + * { std::cerr << "caught " << e.what() << std::endl; } + * return 1; + * } + * } + * int foo(); // throws std::range_error + * sigc::exception_catch(&foo, my_catch())(); + * @endcode + * + * The functor sigc::execption_catch() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * some_signal.connect(sigc::exception_catch(&foo, my_catch)); + * @endcode + * + * @ingroup adaptors + */ + +template ::result_type> +struct exception_catch_functor : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::type type; }; + typedef T_return result_type; + + result_type + operator()(); + +FOR(1,CALL_SIZE,[[EXCEPTION_CATCH_OPERATOR(%1)]])dnl + exception_catch_functor(const T_functor& _A_func, + const T_catcher& _A_catcher) + : adapts(_A_func), catcher_(_A_catcher) + {} + + T_catcher catcher_; +}; + +template +typename exception_catch_functor::result_type +exception_catch_functor::operator()() + { + try + { return this->functor_(); } + catch (...) + { return catcher_(); } + } + +// void specialization +template +struct exception_catch_functor : public adapts +{ + typedef void result_type; + typedef typename adapts::adaptor_type adaptor_type; + + void + operator()(); + +FOR(1,CALL_SIZE,[[EXCEPTION_CATCH_OPERATOR(%1)]])dnl + exception_catch_functor() {} + exception_catch_functor(const T_functor& _A_func, + const T_catcher& _A_catcher) + : adapts(_A_func), catcher_(_A_catcher) + {} + ~exception_catch_functor() {} + + T_catcher catcher_; +}; + +template +void exception_catch_functor::operator()() + { + try + { this->functor_(); } // I don't understand why void return doesn't work here (Martin) + catch (...) + { this->catcher_(); } + } + + +//template specialization of visit_each<>(action, functor): +template +void visit_each(const T_action& _A_action, + const exception_catch_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); + visit_each(_A_action, _A_target.catcher_); +} + + +template +inline exception_catch_functor +exception_catch(const T_functor& _A_func, const T_catcher& _A_catcher) + { return exception_catch_functor(_A_func, _A_catcher); } + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/hide.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/hide.h.m4 new file mode 100644 index 0000000000..d0ba300c5f --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/hide.h.m4 @@ -0,0 +1,231 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([DEDUCE_RESULT_TYPE],[dnl + template + struct deduce_result_type +ifelse($1,0,[dnl + { typedef typename adaptor_type::template deduce_result_type::type type; }; +],[dnl + { typedef typename adaptor_type::template deduce_result_type::type type; }; +])dnl +]) +define([HIDE_OPERATOR],[dnl +ifelse($2,0,,[dnl +ifelse($2,1,[dnl + /** Invokes the wrapped functor ignoring the only argument. + * @param _A_arg%1 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(T_arg1) + { return this->functor_(); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1) + { return this->functor_(); } + #endif + +],$1,0,[dnl + /** Invokes the wrapped functor ignoring the last argument.dnl +FOR(1, eval($2-1),[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @param _A_arg$2 Argument to be ignored. + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_a%1, eval($2-1)), T_arg$2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LIST(FOR(1,eval($2-1),[_A_a%1,]))); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_a%1, eval($2-1)), T_arg$2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LIST(FOR(1,eval($2-1),[_A_a%1,]))); } + #endif + +],[dnl + /** Invokes the wrapped functor ignoring the $1[]th argument.dnl +FOR(1, eval($1-1),[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @param _A_arg$1 Argument to be ignored.dnl +FOR(eval($1+1), $2,[ + * @param _A_arg%1 Argument to be passed on to the functor.]) + * @return The return value of the functor invocation. + */ + template + typename deduce_result_type::type + operator()(LIST(FOR(1,eval($1-1),[T_arg%1 _A_a%1,]),T_arg$1,FOR(eval($1+1),$2,[T_arg%1 _A_a%1,]))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LIST(FOR(1,eval($1-1),[_A_a%1,]),FOR(eval($1+1),$2,[_A_a%1,]))); } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LIST(FOR(1,eval($1-1),[T_arg%1 _A_a%1,]),T_arg$1,FOR(eval($1+1),$2,[T_arg%1 _A_a%1,]))) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LIST(FOR(1,eval($1-1),[_A_a%1,]),FOR(eval($1+1),$2,[_A_a%1,]))); } + #endif + +])])dnl +]) +define([HIDE_FUNCTOR],[dnl +/** Adaptor that adds a dummy parameter to the wrapped functor. + * This template specialization ignores the value of the ifelse($1,-1,[last],[$1[]th]) parameter in operator()(). + * + * @ingroup hide + */ +template +struct hide_functor <$1, T_functor> : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + +DEDUCE_RESULT_TYPE(eval($1+1),CALL_SIZE)dnl + typedef typename adaptor_type::result_type result_type; + +FOR(eval($1+1),CALL_SIZE,[[HIDE_OPERATOR(eval($1+1),%1)]])dnl + + /** Constructs a hide_functor object that adds a dummy parameter to the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit hide_functor(const T_functor& _A_func) + : adapts(_A_func) + {} +}; + +]) + +divert(0)dnl +__FIREWALL__ +#include + +namespace sigc { + +/** @defgroup hide hide(), hide_return() + * sigc::hide() alters an arbitrary functor in that it adds a parameter + * whose value is ignored on invocation of the returned functor. + * Thus you can discard one or more of the arguments of a signal. + * + * You may optionally specify the zero-based position of the parameter + * to ignore as a template argument. The default is to ignore the last + * parameter. + * (A value of @p -1 adds a parameter at the end so sigc::hide<-1>() gives the same result as sigc::hide().) + * + * The type of the parameter can optionally be specified if not deduced. + * + * @par Examples: + * @code + * void foo(int, int); + * // single argument hiding ... + * sigc::hide(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2) + * sigc::hide<-1>(&foo)(1,2,3); // same as sigc::hide(&foo)(1,2,3) (calls foo(1,2)) + * sigc::hide<0>(&foo)(1,2,3); // adds a dummy parameter at the beginning and calls foo(2,3) + * sigc::hide<1>(&foo)(1,2,3); // adds a dummy parameter in the middle and calls foo(1,3) + * sigc::hide<2>(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2) + * // multiple argument hiding ... + * sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls foo(1,2) + * @endcode + * + * The functor sigc::hide() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(); + * some_signal.connect(sigc::hide(&foo)); + * @endcode + * + * sigc::hide_return() alters an arbitrary functor by + * dropping its return value, thus converting it to a void functor. + * + * For a more powerful version of this functionality see the lambda + * library adaptor sigc::group() which can bind, hide and reorder + * arguments arbitrarily. Although sigc::group() is more flexible, + * sigc::hide() provides a means of hiding parameters when then total + * number of parameters called is variable. + * + * @ingroup adaptors + */ + +/** Adaptor that adds a dummy parameter to the wrapped functor. + * Use the convenience function sigc::hide() to create an instance of sigc::hide_functor. + * + * The following template arguments are used: + * - @e I_location Zero-based position of the dummy parameter (@p -1 for the last parameter). + * - @e T_type Type of the dummy parameter. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup hide + */ +template +struct hide_functor; + +FOR(-1,eval(CALL_SIZE-1),[[HIDE_FUNCTOR(%1)]])dnl + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::hide_functor performs a functor on the + * functor stored in the sigc::hide_functor object. + * + * @ingroup hide + */ +template +void visit_each(const T_action& _A_action, + const hide_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor. + * The optional template argument @e I_location specifies the zero-based + * position of the dummy parameter in the returned functor (@p -1 stands for the last parameter). + * + * @param _A_func Functor that should be wrapped. + * @return Adaptor that executes @e _A_func ignoring the value of the dummy parameter. + * + * @ingroup hide + */ +template +inline hide_functor +hide(const T_functor& _A_func) + { return hide_functor(_A_func); } + +/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor. + * This overload adds a dummy parameter at the back of the functor's parameter list. + * + * @param _A_func Functor that should be wrapped. + * @return Adaptor that executes @e _A_func ignoring the value of the last parameter. + * + * @ingroup hide + */ +template +inline hide_functor<-1, T_functor> +hide(const T_functor& _A_func) + { return hide_functor<-1, T_functor> (_A_func); } + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/retype.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/retype.h.m4 new file mode 100644 index 0000000000..d0cbb17145 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/retype.h.m4 @@ -0,0 +1,204 @@ +dnl Copyright 2003, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([RETYPE_OPERATOR],[dnl +ifelse($1,0,[dnl + result_type operator()(); + +],[dnl + template + typename deduce_result_type::type + operator()(LOOP(T_arg%1 _A_a%1, $1)) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1)); + } + #endif + +])dnl +]) +define([RETYPE_POINTER_FUNCTOR],[dnl +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, LOOP(T_arg%1, $1)) > +retype(const pointer_functor$1& _A_functor) +{ return retype_functor, LOOP(T_arg%1, $1)) > + (_A_functor); } + +]) +define([RETYPE_MEM_FUNCTOR],[dnl +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::$2[]mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, LOOP(T_arg%1, $1)) > +retype(const $2[]mem_functor$1& _A_functor) +{ return retype_functor, LOOP(T_arg%1, $1)) > + (_A_functor); } + +]) + +divert(0)dnl +__FIREWALL__ +#include +#include +#include +#include + +namespace sigc { + +/** @defgroup retype retype(), retype_return() + * sigc::retype() alters a sigc::pointer_functor, a sigc::mem_functor or a sigc::slot + * in that it makes C-style casts to the functor's parameter types + * of all parameters passed through operator()(). + * + * Use this adaptor for inline conversion between numeric or other simple types. + * @par Example: + * @code + * void foo(int); + * sigc::retype(sigc::ptr_fun(&foo))(5.7F); // calls foo(5) + * @endcode + * + * The functor sigc::retype() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::retype(sigc::ptr_fun(&foo))); + * @endcode + * + * This adaptor builds an exception in that it only works on sig::pointer_functor, + * sigc::mem_functor and sigc::slot because it needs sophisticated information about + * the parameter types that cannot be deduced from arbitrary functor types. + * + * sigc::retype_return() alters the return type of an arbitrary functor. + * Like in sigc::retype() a C-style cast is preformed. Usage sigc::retype_return() is + * not restricted to libsigc++ functor types but you need to + * specify the new return type as a template parameter. + * + * @par Example: + * @code + * float foo(); + * std::cout << sigc::retype_return(&foo)(); // converts foo's return value to an integer + * @endcode + * + * @ingroup adaptors + */ + +/** Adaptor that performs C-style casts on the parameters passed on to the functor. + * Use the convenience function sigc::retype() to create an instance of retype_functor. + * + * The following template arguments are used: + * - @e T_functor Type of the functor to wrap.dnl +FOR(1, CALL_SIZE,[ + * - @e T_type%1 Type of @e T_functor's %1th argument.]) + * + * @ingroup retype + */ +template +struct retype_functor + : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::type type; }; + typedef typename adapts::result_type result_type; + +FOR(0,CALL_SIZE,[[RETYPE_OPERATOR(%1)]])dnl + + /** Constructs a retype_functor object that performs C-style casts on the parameters passed on to the functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit retype_functor(typename type_trait::take _A_functor) + : adapts(_A_functor) + {} +}; + +template +typename retype_functor::result_type +retype_functor::operator()() + { return this->functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::retype_functor performs a functor on the + * functor stored in the sigc::retype_functor object. + * + * @ingroup retype + */ +template +void visit_each(const T_action& _A_action, + const retype_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::slot. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, LOOP(T_arg%1, CALL_SIZE)) > +retype(const slot& _A_functor) +{ return retype_functor, LOOP(T_arg%1, CALL_SIZE)) > + (_A_functor); } + + +FOR(0,CALL_SIZE,[[RETYPE_POINTER_FUNCTOR(%1)]])dnl + +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[const_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[volatile_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[const_volatile_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[bound_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[bound_const_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[bound_volatile_])]])dnl +FOR(0,CALL_SIZE,[[RETYPE_MEM_FUNCTOR(%1,[bound_const_volatile_])]])dnl + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/macros/retype_return.h.m4 b/libs/sigc++2/sigc++/adaptors/macros/retype_return.h.m4 new file mode 100644 index 0000000000..1536ab7803 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/macros/retype_return.h.m4 @@ -0,0 +1,165 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([RETYPE_RETURN_OPERATOR],[dnl + template + inline T_return operator()(LOOP(T_arg%1 _A_a%1, $1)) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1))); + } + #endif + +]) +define([RETYPE_RETURN_VOID_OPERATOR],[dnl + template + inline void operator()(LOOP(T_arg%1 _A_a%1, $1)) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(_A_a%1, $1)); + } + #endif + +]) + +divert(0)dnl +__FIREWALL__ +#include + +namespace sigc { + +/** Adaptor that perform a C-style cast on the return value of a functor. + * Use the convenience function sigc::retype_return() to create an instance of retype_return_functor. + * + * The following template arguments are used: + * - @e T_return Target type of the C-style cast. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup retype + */ +template +struct retype_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef T_return type; }; + typedef T_return result_type; + + T_return operator()(); + +FOR(1,CALL_SIZE,[[RETYPE_RETURN_OPERATOR(%1)]])dnl + retype_return_functor() {} + + /** Constructs a retype_return_functor object that perform a C-style cast on the return value of the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit retype_return_functor(_R_(T_functor) _A_functor) + : adapts(_A_functor) + {} +}; + +template +T_return retype_return_functor::operator()() + { return T_return(this->functor_()); } + + +/** Adaptor that perform a C-style cast on the return value of a functor. + * This template specialization is for a void return. It drops the return value of the functor it invokes. + * Use the convenience function sigc::hide_return() to create an instance of sigc::retype_return_functor. + * + * @ingroup retype + */ +/* The void specialization needed because of explicit cast to T_return. + */ +template +struct retype_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef void type; }; + typedef void result_type; + + void operator()(); + +FOR(1,CALL_SIZE,[[RETYPE_RETURN_VOID_OPERATOR(%1)]])dnl + retype_return_functor() {} + retype_return_functor(_R_(T_functor) _A_functor) + : adapts(_A_functor) + {} +}; + +template +void retype_return_functor::operator()() + { this->functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::retype_return_functor performs a functor on the + * functor stored in the sigc::retype_return_functor object. + * + * @ingroup retype + */ +template +void visit_each(const T_action& _A_action, + const retype_return_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::retype_return_functor which performs a C-style cast on the return value of the passed functor. + * The template argument @e T_return specifies the target type of the cast. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing a C-style casts on the return value. + * + * @ingroup retype + */ +template +inline retype_return_functor +retype_return(const T_functor& _A_functor) + { return retype_return_functor(_A_functor); } + +/** Creates an adaptor of type sigc::retype_return_functor which drops the return value of the passed functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor dropping its return value. + * + * @ingroup hide + */ +template +inline retype_return_functor +hide_return(const T_functor& _A_functor) + { return retype_return_functor(_A_functor); } + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/adaptors/retype.h b/libs/sigc++2/sigc++/adaptors/retype.h new file mode 100644 index 0000000000..58f86306fc --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/retype.h @@ -0,0 +1,1248 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_RETYPEHM4_ +#define _SIGC_ADAPTORS_MACROS_RETYPEHM4_ +#include +#include +#include +#include + +namespace sigc { + +/** @defgroup retype retype(), retype_return() + * sigc::retype() alters a sigc::pointer_functor, a sigc::mem_functor or a sigc::slot + * in that it makes C-style casts to the functor's parameter types + * of all parameters passed through operator()(). + * + * Use this adaptor for inline conversion between numeric or other simple types. + * @par Example: + * @code + * void foo(int); + * sigc::retype(sigc::ptr_fun(&foo))(5.7F); // calls foo(5) + * @endcode + * + * The functor sigc::retype() returns can be passed into + * sigc::signal::connect() directly. + * + * @par Example: + * @code + * sigc::signal some_signal; + * void foo(int); + * some_signal.connect(sigc::retype(sigc::ptr_fun(&foo))); + * @endcode + * + * This adaptor builds an exception in that it only works on sig::pointer_functor, + * sigc::mem_functor and sigc::slot because it needs sophisticated information about + * the parameter types that cannot be deduced from arbitrary functor types. + * + * sigc::retype_return() alters the return type of an arbitrary functor. + * Like in sigc::retype() a C-style cast is preformed. Usage sigc::retype_return() is + * not restricted to libsigc++ functor types but you need to + * specify the new return type as a template parameter. + * + * @par Example: + * @code + * float foo(); + * std::cout << sigc::retype_return(&foo)(); // converts foo's return value to an integer + * @endcode + * + * @ingroup adaptors + */ + +/** Adaptor that performs C-style casts on the parameters passed on to the functor. + * Use the convenience function sigc::retype() to create an instance of retype_functor. + * + * The following template arguments are used: + * - @e T_functor Type of the functor to wrap. + * - @e T_type1 Type of @e T_functor's 1th argument. + * - @e T_type2 Type of @e T_functor's 2th argument. + * - @e T_type3 Type of @e T_functor's 3th argument. + * - @e T_type4 Type of @e T_functor's 4th argument. + * - @e T_type5 Type of @e T_functor's 5th argument. + * - @e T_type6 Type of @e T_functor's 6th argument. + * - @e T_type7 Type of @e T_functor's 7th argument. + * + * @ingroup retype + */ +template +struct retype_functor + : public adapts +{ + typedef typename adapts::adaptor_type adaptor_type; + + template + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass>::type type; }; + typedef typename adapts::result_type result_type; + + result_type operator()(); + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take> + (static_cast(_A_a1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take> + (static_cast(_A_a1)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5),static_cast(_A_a6)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5),static_cast(_A_a6)); + } + #endif + + template + typename deduce_result_type::type + operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5),static_cast(_A_a6),static_cast(_A_a7)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + typename deduce_result_type::type + sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (static_cast(_A_a1),static_cast(_A_a2),static_cast(_A_a3),static_cast(_A_a4),static_cast(_A_a5),static_cast(_A_a6),static_cast(_A_a7)); + } + #endif + + + /** Constructs a retype_functor object that performs C-style casts on the parameters passed on to the functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit retype_functor(typename type_trait::take _A_functor) + : adapts(_A_functor) + {} +}; + +template +typename retype_functor::result_type +retype_functor::operator()() + { return this->functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::retype_functor performs a functor on the + * functor stored in the sigc::retype_functor object. + * + * @ingroup retype + */ +template +void visit_each(const T_action& _A_action, + const retype_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::slot. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const slot& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const pointer_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const pointer_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const pointer_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const pointer_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const pointer_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const pointer_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const pointer_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::pointer_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const pointer_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const const_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const const_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const const_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const const_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const const_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const const_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const const_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const const_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const volatile_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const volatile_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const volatile_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const volatile_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const volatile_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const volatile_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const volatile_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const volatile_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const const_volatile_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const const_volatile_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const const_volatile_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const const_volatile_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const const_volatile_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const const_volatile_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const const_volatile_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const const_volatile_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const bound_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const bound_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const bound_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const bound_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const bound_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const bound_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const bound_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const bound_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const bound_const_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const bound_const_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const bound_const_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const bound_const_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const bound_const_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const bound_const_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const bound_const_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const bound_const_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const bound_volatile_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const bound_volatile_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const bound_volatile_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const bound_volatile_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const bound_volatile_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const bound_volatile_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const bound_volatile_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const bound_volatile_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor > +retype(const bound_const_volatile_mem_functor0& _A_functor) +{ return retype_functor > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1 > +retype(const bound_const_volatile_mem_functor1& _A_functor) +{ return retype_functor, T_arg1 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2 > +retype(const bound_const_volatile_mem_functor2& _A_functor) +{ return retype_functor, T_arg1,T_arg2 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3 > +retype(const bound_const_volatile_mem_functor3& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > +retype(const bound_const_volatile_mem_functor4& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > +retype(const bound_const_volatile_mem_functor5& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > +retype(const bound_const_volatile_mem_functor6& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 > + (_A_functor); } + +/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor. + * This function template specialization works on sigc::bound_const_volatile_mem_functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on. + * + * @ingroup retype + */ +template +inline retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > +retype(const bound_const_volatile_mem_functor7& _A_functor) +{ return retype_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 > + (_A_functor); } + + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_RETYPEHM4_ */ diff --git a/libs/sigc++2/sigc++/adaptors/retype_return.h b/libs/sigc++2/sigc++/adaptors/retype_return.h new file mode 100644 index 0000000000..16d557ca72 --- /dev/null +++ b/libs/sigc++2/sigc++/adaptors/retype_return.h @@ -0,0 +1,309 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_ +#define _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_ +#include + +namespace sigc { + +/** Adaptor that perform a C-style cast on the return value of a functor. + * Use the convenience function sigc::retype_return() to create an instance of retype_return_functor. + * + * The following template arguments are used: + * - @e T_return Target type of the C-style cast. + * - @e T_functor Type of the functor to wrap. + * + * @ingroup retype + */ +template +struct retype_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef T_return type; }; + typedef T_return result_type; + + T_return operator()(); + + template + inline T_return operator()(T_arg1 _A_a1) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6)); + } + #endif + + template + inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7)); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7)); + } + #endif + + retype_return_functor() {} + + /** Constructs a retype_return_functor object that perform a C-style cast on the return value of the passed functor. + * @param _A_functor Functor to invoke from operator()(). + */ + explicit retype_return_functor(typename type_trait::take _A_functor) + : adapts(_A_functor) + {} +}; + +template +T_return retype_return_functor::operator()() + { return T_return(this->functor_()); } + + +/** Adaptor that perform a C-style cast on the return value of a functor. + * This template specialization is for a void return. It drops the return value of the functor it invokes. + * Use the convenience function sigc::hide_return() to create an instance of sigc::retype_return_functor. + * + * @ingroup retype + */ +/* The void specialization needed because of explicit cast to T_return. + */ +template +struct retype_return_functor : public adapts +{ + template + struct deduce_result_type + { typedef void type; }; + typedef void result_type; + + void operator()(); + + template + inline void operator()(T_arg1 _A_a1) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass> + (_A_a1); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass> + (_A_a1,_A_a2); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + #endif + + template + inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7) + { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass,typename type_trait::pass> + (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + #endif + + retype_return_functor() {} + retype_return_functor(typename type_trait::take _A_functor) + : adapts(_A_functor) + {} +}; + +template +void retype_return_functor::operator()() + { this->functor_(); } + + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::retype_return_functor performs a functor on the + * functor stored in the sigc::retype_return_functor object. + * + * @ingroup retype + */ +template +void visit_each(const T_action& _A_action, + const retype_return_functor& _A_target) +{ + visit_each(_A_action, _A_target.functor_); +} + + +/** Creates an adaptor of type sigc::retype_return_functor which performs a C-style cast on the return value of the passed functor. + * The template argument @e T_return specifies the target type of the cast. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor performing a C-style casts on the return value. + * + * @ingroup retype + */ +template +inline retype_return_functor +retype_return(const T_functor& _A_functor) + { return retype_return_functor(_A_functor); } + +/** Creates an adaptor of type sigc::retype_return_functor which drops the return value of the passed functor. + * + * @param _A_functor Functor that should be wrapped. + * @return Adaptor that executes @e _A_functor dropping its return value. + * + * @ingroup hide + */ +template +inline retype_return_functor +hide_return(const T_functor& _A_functor) + { return retype_return_functor(_A_functor); } + +} /* namespace sigc */ +#endif /* _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_ */ diff --git a/libs/sigc++2/sigc++/bind.h b/libs/sigc++2/sigc++/bind.h new file mode 100644 index 0000000000..4741377ca9 --- /dev/null +++ b/libs/sigc++2/sigc++/bind.h @@ -0,0 +1,24 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_BIND_HPP_ +#define _SIGC_BIND_HPP_ + +#include + +#endif /* _SIGC_BIND_HPP_ */ diff --git a/libs/sigc++2/sigc++/bind_return.h b/libs/sigc++2/sigc++/bind_return.h new file mode 100644 index 0000000000..fa90c45438 --- /dev/null +++ b/libs/sigc++2/sigc++/bind_return.h @@ -0,0 +1,25 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_BIND_RETURN_HPP_ +#define _SIGC_BIND_RETURN_HPP_ + +#include + + +#endif /* _SIGC_BIND_RETURN_HPP_ */ diff --git a/libs/sigc++2/sigc++/class_slot.h b/libs/sigc++2/sigc++/class_slot.h new file mode 100644 index 0000000000..d9156cce01 --- /dev/null +++ b/libs/sigc++2/sigc++/class_slot.h @@ -0,0 +1,11 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + +#ifndef _SIGC_MACROS_CLASS_SLOTHM4_ +#define _SIGC_MACROS_CLASS_SLOTHM4_ + +#include +#include + +#endif /* _SIGC_MACROS_CLASS_SLOTHM4_ */ diff --git a/libs/sigc++2/sigc++/connection.cc b/libs/sigc++2/sigc++/connection.cc new file mode 100644 index 0000000000..ff785e5e63 --- /dev/null +++ b/libs/sigc++2/sigc++/connection.cc @@ -0,0 +1,111 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +using namespace std; + +namespace sigc { + +connection::connection() +: slot_(0) +{} + +connection::connection(const connection& c) +: slot_(c.slot_) +{ + //Let the connection forget about the signal handler when the handler object dies: + if (slot_) + slot_->add_destroy_notify_callback(this, ¬ify); +} + +connection::connection(slot_base& sl) +: slot_(&sl) +{ + //Let the connection forget about the signal handler when the handler object dies: + slot_->add_destroy_notify_callback(this, ¬ify); +} + +connection& connection::operator=(const connection& c) +{ + set_slot(c.slot_); + return *this; +} + +connection::~connection() +{ + if (slot_) + slot_->remove_destroy_notify_callback(this); +} + +bool connection::empty() const +{ + return (!slot_ || slot_->empty()); +} + +bool connection::connected() const +{ + return !empty(); +} + +bool connection::blocked() const +{ + return (slot_ ? slot_->blocked() : false); +} + +bool connection::block(bool should_block) +{ + return (slot_ ? slot_->block(should_block) : false); +} + +bool connection::unblock() +{ + return (slot_ ? slot_->unblock() : false); +} + +void connection::disconnect() +{ + if (slot_) + slot_->disconnect(); // This notifies slot_'s parent. +} + +connection::operator bool() +{ + return !empty(); +} + +void connection::set_slot(slot_base* sl) +{ + if (slot_) + slot_->remove_destroy_notify_callback(this); + + slot_ = sl; + + if (slot_) + slot_->add_destroy_notify_callback(this, ¬ify); +} + +void* connection::notify(void* data) +{ + connection* self = reinterpret_cast(data); + self->slot_ = 0; + return 0; +} + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/connection.h b/libs/sigc++2/sigc++/connection.h new file mode 100644 index 0000000000..c8855e6472 --- /dev/null +++ b/libs/sigc++2/sigc++/connection.h @@ -0,0 +1,129 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_CONNECTION_HPP_ +#define _SIGC_CONNECTION_HPP_ +#include +#include + +namespace sigc { + +/** Convinience class for safe disconnection. + * Iterators must not be used beyond the lifetime of the list + * they work on. A connection object can be created from a + * slot list iterator and may safely be used to disconnect + * the referred slot at any time (disconnect()). If the slot + * has already been destroyed, disconnect() does nothing. empty() or + * operator bool() can be used to test whether the connection is + * still active. The connection can be blocked (block(), unblock()). + * + * This is possible because the connection object gets notified + * when the referred slot dies (notify()). + * + * @ingroup signal + */ +struct SIGC_API connection +{ + /** Constructs an empty connection object. */ + connection(); + + /** Constructs a connection object copying an existing one. + * @param c The connection object to make a copy from. + */ + connection(const connection& c); + + /** Constructs a connection object from a slot list iterator. + * @param it The slot list iterator to take the slot from. + */ + template + connection(const slot_iterator& it) : slot_(&(*it)) + { if (slot_) slot_->add_destroy_notify_callback(this, ¬ify); } + + /** Constructs a connection object from a slot object. + * This is only useful if you create your own slot list. + * @param sl The slot to operate on. + */ + explicit connection(slot_base& sl); + + /** Overrides this connection object copying another one. + * @param c The connection object to make a copy from. + */ + connection& operator=(const connection& c); + + /** Overrides this connection object with another slot list iterator. + * @param it The new slot list iterator to take the slot from. + */ + template + connection& operator=(const slot_iterator& it) + { set_slot(&(*it)); return *this; } + + ~connection(); + + /** Returns whether the connection is still active. + * @return @p false if the connection is still active. + */ + bool empty() const; + + /** Returns whether the connection is still active. + * @return @p true if the connection is still active. + */ + bool connected() const; + + /** Returns whether the connection is blocked. + * @return @p true if the connection is blocked. + */ + bool blocked() const; + + /** Sets or unsets the blocking state of this connection. + * See slot_base::block() for details. + * @param should_block Indicates whether the blocking state should be set or unset. + * @return @p true if the connection has been in blocking state before. + */ + bool block(bool should_block = true); + + /** Unsets the blocking state of this connection. + * @return @p true if the connection has been in blocking state before. + */ + bool unblock(); + + /// Disconnects the referred slot. + void disconnect(); + + /** Returns whether the connection is still active. + * @return @p true if the connection is still active. + */ + operator bool(); + + /** Callback that is executed when the referred slot is destroyed. + * @param d The connection object notified (@p this). + */ + static void* notify(void* data); + +private: + void set_slot(slot_base* sl); + + /* Referred slot. Set to zero from notify(). + * A value of zero indicates an "empty" connection. + */ + slot_base* slot_; +}; + +} /* namespace sigc */ + + +#endif /* _SIGC_TRACKABLE_HPP_ */ diff --git a/libs/sigc++2/sigc++/functors/functor_trait.h b/libs/sigc++2/sigc++/functors/functor_trait.h new file mode 100644 index 0000000000..656d010414 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/functor_trait.h @@ -0,0 +1,307 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +/* + Trait functor_trait: + + This trait allows the user to specific what is the return type + of any type. It has been overloaded to detect the return type and + the functor version of function pointers and class methods as well. + + To populate the return type of user defined and third party functors + use the macro SIGC_FUNCTOR_TRAIT(T_functor,T_return) in + namespace sigc. Multi-type functors are only partly supported. + Try specifying the return type of the functor's operator()() overload. + + Alternatively, you can derive your functors from functor_base and + place "typedef T_return result_type;" in the class definition. + + Use SIGC_FUNCTORS_HAVE_RESULT_TYPE if you want sigc++ to assume that + result_type is defined in all user defined or 3rd-party functors + (except those you specify a return type explicitly with SIGC_FUNCTOR_TRAIT()). + +*/ +#ifndef _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_ +#define _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_ +#include + + +namespace sigc { + +/** nil struct type. + * The nil struct type is used as default template argument in the + * unnumbered sigc::signal and sigc::slot templates. + * + * @ingroup signal + * @ingroup slot + */ +struct nil; + + +/** @defgroup functors Functors + * Functors are copyable types that define operator()(). + * + * Types that define operator()() overloads with different return types are referred to + * as multi-type functors. Multi-type functors are only partly supported in libsigc++. + * + * Closures are functors that store all information needed to invoke a callback from operator()(). + * + * Adaptors are functors that alter the signature of a functor's operator()(). + * + * libsigc++ defines numerous functors, closures and adaptors. + * Since libsigc++ is a callback libaray, most functors are also closures. + * The documentation doesn't distinguish between functors and closures. + * + * The basic functor types libsigc++ provides are created with ptr_fun() and mem_fun() + * and can be converted into slots implicitly. + * The set of adaptors that ships with libsigc++ is documented in the equally named module. + */ + +/** A hint to the compiler. + * All functors which define @p result_type should publically inherit from this hint. + * + * @ingroup functors + */ +struct functor_base {}; + + +template ::value> +struct functor_trait +{ + typedef void result_type; + typedef T_functor functor_type; +}; + +template +struct functor_trait +{ + typedef typename T_functor::result_type result_type; + typedef T_functor functor_type; +}; + +/** If you want to mix functors from a different library with libsigc++ and + * these functors define @p result_type simply use this macro inside namespace sigc like so: + * @code + * namespace sigc { SIGC_FUNCTORS_HAVE_RESULT_TYPE } + * @endcode + * + * @ingroup functors + */ +#define SIGC_FUNCTORS_HAVE_RESULT_TYPE \ +template \ +struct functor_trait \ +{ \ + typedef typename T_functor::result_type result_type; \ + typedef T_functor functor_type; \ +}; + +/** If you want to mix functors from a different library with libsigc++ and + * these functors don't define @p result_type use this macro inside namespace sigc + * to expose the return type of the functors like so: + * @code + * namespace sigc { + * SIGC_FUNCTOR_TRAIT(first_functor_type, return_type_of_first_functor_type) + * SIGC_FUNCTOR_TRAIT(second_functor_type, return_type_of_second_functor_type) + * ... + * } + * @endcode + * + * @ingroup functors + */ +#define SIGC_FUNCTOR_TRAIT(T_functor,T_return) \ +template <> \ +struct functor_trait \ +{ \ + typedef T_return result_type; \ + typedef T_functor functor_type; \ +}; + +// detect the return type and the functor version of non-functor types. +template class pointer_functor0; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor0 functor_type; +}; + +template class pointer_functor1; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor1 functor_type; +}; + +template class pointer_functor2; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor2 functor_type; +}; + +template class pointer_functor3; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor3 functor_type; +}; + +template class pointer_functor4; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor4 functor_type; +}; + +template class pointer_functor5; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor5 functor_type; +}; + +template class pointer_functor6; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor6 functor_type; +}; + +template class pointer_functor7; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor7 functor_type; +}; + + +template class mem_functor0; +template class const_mem_functor0; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor0 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor0 functor_type; +}; + +template class mem_functor1; +template class const_mem_functor1; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor1 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor1 functor_type; +}; + +template class mem_functor2; +template class const_mem_functor2; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor2 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor2 functor_type; +}; + +template class mem_functor3; +template class const_mem_functor3; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor3 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor3 functor_type; +}; + +template class mem_functor4; +template class const_mem_functor4; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor4 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor4 functor_type; +}; + +template class mem_functor5; +template class const_mem_functor5; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor5 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor5 functor_type; +}; + +template class mem_functor6; +template class const_mem_functor6; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor6 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor6 functor_type; +}; + +template class mem_functor7; +template class const_mem_functor7; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor7 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor7 functor_type; +}; + + + +} /* namespace sigc */ +#endif /* _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_ */ diff --git a/libs/sigc++2/sigc++/functors/functors.h b/libs/sigc++2/sigc++/functors/functors.h new file mode 100644 index 0000000000..3a9619c21d --- /dev/null +++ b/libs/sigc++2/sigc++/functors/functors.h @@ -0,0 +1,27 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_FUNCTOR_HPP_ +#define _SIGC_FUNCTOR_HPP_ + +#include +#include +#include + +#endif /* _SIGC_FUNCTOR_HPP_ */ diff --git a/libs/sigc++2/sigc++/functors/macros/functor_trait.h.m4 b/libs/sigc++2/sigc++/functors/macros/functor_trait.h.m4 new file mode 100644 index 0000000000..7aef76a708 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/macros/functor_trait.h.m4 @@ -0,0 +1,172 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) +include(template.macros.m4) + +define([FUNCTOR_PTR_FUN],[dnl +template class pointer_functor$1; +template +struct functor_trait +{ + typedef T_return result_type; + typedef pointer_functor$1 functor_type; +}; + +]) +define([FUNCTOR_MEM_FUN],[dnl +template class mem_functor$1; +template class const_mem_functor$1; +template +struct functor_trait +{ + typedef T_return result_type; + typedef mem_functor$1 functor_type; +}; +template +struct functor_trait +{ + typedef T_return result_type; + typedef const_mem_functor$1 functor_type; +}; + +]) + +divert(0)dnl +/* + Trait functor_trait: + + This trait allows the user to specific what is the return type + of any type. It has been overloaded to detect the return type and + the functor version of function pointers and class methods as well. + + To populate the return type of user defined and third party functors + use the macro SIGC_FUNCTOR_TRAIT(T_functor,T_return) in + namespace sigc. Multi-type functors are only partly supported. + Try specifying the return type of the functor's operator()() overload. + + Alternatively, you can derive your functors from functor_base and + place "typedef T_return result_type;" in the class definition. + + Use SIGC_FUNCTORS_HAVE_RESULT_TYPE if you want sigc++ to assume that + result_type is defined in all user defined or 3rd-party functors + (except those you specify a return type explicitly with SIGC_FUNCTOR_TRAIT()). + +dnl 01.11.2003: Completely removed support for typeof() since it is non-standard! +dnl You might get away without these conventions if your compiler supports +dnl typeof() and if you don't happen to use the operator()() overload of +dnl sigc++'s adaptors in your program. +dnl +*/ +__FIREWALL__ +#include + + +namespace sigc { + +/** nil struct type. + * The nil struct type is used as default template argument in the + * unnumbered sigc::signal and sigc::slot templates. + * + * @ingroup signal + * @ingroup slot + */ +struct nil; + + +/** @defgroup functors Functors + * Functors are copyable types that define operator()(). + * + * Types that define operator()() overloads with different return types are referred to + * as multi-type functors. Multi-type functors are only partly supported in libsigc++. + * + * Closures are functors that store all information needed to invoke a callback from operator()(). + * + * Adaptors are functors that alter the signature of a functor's operator()(). + * + * libsigc++ defines numerous functors, closures and adaptors. + * Since libsigc++ is a callback libaray, most functors are also closures. + * The documentation doesn't distinguish between functors and closures. + * + * The basic functor types libsigc++ provides are created with ptr_fun() and mem_fun() + * and can be converted into slots implicitly. + * The set of adaptors that ships with libsigc++ is documented in the equally named module. + */ + +/** A hint to the compiler. + * All functors which define @p result_type should publically inherit from this hint. + * + * @ingroup functors + */ +struct functor_base {}; + + +template ::value> +struct functor_trait +{ + typedef void result_type; + typedef T_functor functor_type; +}; + +template +struct functor_trait +{ + typedef typename T_functor::result_type result_type; + typedef T_functor functor_type; +}; + +/** If you want to mix functors from a different library with libsigc++ and + * these functors define @p result_type simply use this macro inside namespace sigc like so: + * @code + * namespace sigc { SIGC_FUNCTORS_HAVE_RESULT_TYPE } + * @endcode + * + * @ingroup functors + */ +#define SIGC_FUNCTORS_HAVE_RESULT_TYPE \ +template \ +struct functor_trait \ +{ \ + typedef typename T_functor::result_type result_type; \ + typedef T_functor functor_type; \ +}; + +/** If you want to mix functors from a different library with libsigc++ and + * these functors don't define @p result_type use this macro inside namespace sigc + * to expose the return type of the functors like so: + * @code + * namespace sigc { + * SIGC_FUNCTOR_TRAIT(first_functor_type, return_type_of_first_functor_type) + * SIGC_FUNCTOR_TRAIT(second_functor_type, return_type_of_second_functor_type) + * ... + * } + * @endcode + * + * @ingroup functors + */ +#define SIGC_FUNCTOR_TRAIT(T_functor,T_return) \ +template <> \ +struct functor_trait \ +{ \ + typedef T_return result_type; \ + typedef T_functor functor_type; \ +}; + +// detect the return type and the functor version of non-functor types. +FOR(0,CALL_SIZE,[[FUNCTOR_PTR_FUN(%1)]]) +FOR(0,CALL_SIZE,[[FUNCTOR_MEM_FUN(%1)]]) + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/functors/macros/mem_fun.h.m4 b/libs/sigc++2/sigc++/functors/macros/mem_fun.h.m4 new file mode 100644 index 0000000000..7c60f3d6a0 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/macros/mem_fun.h.m4 @@ -0,0 +1,272 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([MEMBER_FUNCTOR],[dnl +/** [$2]mem_functor$1 wraps $4 methods with $1 argument(s). + * Use the convenience function mem_fun() to create an instance of [$2]mem_functor$1. + * + * The following template arguments are used:dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of operator()().]) + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class [$2]mem_functor$1 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(LOOP(T_arg%1, $1)) $4; + typedef T_return result_type; + + /// Constructs an invalid functor. + [$2]mem_functor$1() : func_ptr_(0) {} + + /** Constructs a [$2]mem_functor$1 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit [$2]mem_functor$1(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the method.]) + * @return The return value of the method invocation. + */ + T_return operator()(LIST($3 T_obj* _A_obj, LOOP(typename type_trait::take _A_a%1, $1))) const + { return (_A_obj->*(this->func_ptr_))(LOOP(_A_a%1, $1)); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the method.]) + * @return The return value of the method invocation. + */ + T_return operator()(LIST($3 T_obj& _A_obj, LOOP(typename type_trait::take _A_a%1, $1))) const + { return (_A_obj.*func_ptr_)(LOOP(_A_a%1, $1)); } + +protected: + function_type func_ptr_; +}; + +]) +define([BOUND_MEMBER_FUNCTOR],[dnl + +/** bound_[$2]mem_functor$1 encapsulates a $4 method with $1 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_[$2]mem_functor$1. + * + * The following template arguments are used:dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of operator()().]) + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_[$2]mem_functor$1 + : public [$2]mem_functor$1 +{ + typedef [$2]mem_functor$1 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_[$2]mem_functor$1 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_[$2]mem_functor$1($3 T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_[$2]mem_functor$1 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_[$2]mem_functor$1($3 T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the method.]) + * @return The return value of the method invocation. + */ + T_return operator()(LOOP(typename type_trait::take _A_a%1, $1)) const + { return (obj_.invoke().*(this->func_ptr_))(LOOP(_A_a%1, $1)); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + [$2]limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_[$2]mem_functor performs a functor + * on the object instance stored in the sigc::bound_[$2]mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_[$2]mem_functor$1& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + +]) + +define([MEM_FUN],[dnl +/** Creates a functor of type sigc::[$3]mem_functor$1 which wraps a $5 method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline [$3]mem_functor$1 +mem_fun[]ifelse($2,, $1)(T_return (T_obj::*_A_func)(LOOP(T_arg%1,$1)) $5) +{ return [$3]mem_functor$1(_A_func); } + +]) +define([BOUND_MEM_FUN],[dnl +/** Creates a functor of type sigc::bound_[$3]mem_functor$1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_[$3]mem_functor$1 +mem_fun[]ifelse($2,, $1)(/*$4*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(LOOP(T_arg%1,$1)) $5) +{ return bound_[$3]mem_functor$1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_[$3]mem_functor$1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_[$3]mem_functor$1 +mem_fun[]ifelse($2,, $1)(/*$4*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(LOOP(T_arg%1,$1)) $5) +{ return bound_[$3]mem_functor$1(_A_obj, _A_func); } + +]) + +divert(0) + +// implementation notes: +// - we do not use bind here, because it would introduce +// an extra copy and complicate the header include order if bind is +// to have automatic conversion for member pointers. +__FIREWALL__ +#include +#include +#include + +namespace sigc { + +/** @defgroup mem_fun mem_fun() + * mem_fun() is used to convert a pointer to a method to a functor. + * + * Optionally a reference or pointer to an object can be bound to the functor. + * Note that only if the object type inherits from sigc::trackable + * the slot is cleared automatically when the object goes out of scope! + * + * If the member function pointer is to an overloaded type, you must specify + * the types using template arguments starting with the first argument. + * It is not necessary to supply the return type. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) {} + * }; + * foo my_foo; + * sigc::slot sl = sigc::mem_fun(my_foo, &foo::bar); + * @endcode + * + * For const methods mem_fun() takes a const reference or pointer to an object. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) const {} + * }; + * const foo my_foo; + * sigc::slot sl = sigc::mem_fun(my_foo, &foo::bar); + * @endcode + * + * Use mem_fun#() if there is an abiguity as to the number of arguments. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) {} + * void bar(float) {} + * void bar(int, int) {} + * }; + * foo my_foo; + * sigc::slot sl = sigc::mem_fun1(my_foo, &foo::bar); + * @endcode + * + * @ingroup functors + */ + +FOR(0,CALL_SIZE,[[MEMBER_FUNCTOR(%1,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[MEMBER_FUNCTOR(%1,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[MEMBER_FUNCTOR(%1,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[MEMBER_FUNCTOR(%1,[const_volatile_],[const],[const volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEMBER_FUNCTOR(%1,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEMBER_FUNCTOR(%1,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEMBER_FUNCTOR(%1,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEMBER_FUNCTOR(%1,[const_volatile_],[const],[const volatile])]])dnl + +// numbered +FOR(0,CALL_SIZE,[[MEM_FUN(%1,,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,,[const_volatile_],[const],[const volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,,[const_volatile_],[const],[const volatile])]])dnl + +// unnumbered +FOR(0,CALL_SIZE,[[MEM_FUN(%1,1,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,1,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,1,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[MEM_FUN(%1,1,[const_volatile_],[const],[const volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,1,[],[],[])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,1,[const_],[const],[const])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,1,[volatile_],[],[volatile])]])dnl +FOR(0,CALL_SIZE,[[BOUND_MEM_FUN(%1,1,[const_volatile_],[const],[const volatile])]])dnl + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/functors/macros/ptr_fun.h.m4 b/libs/sigc++2/sigc++/functors/macros/ptr_fun.h.m4 new file mode 100644 index 0000000000..6f9e1e49da --- /dev/null +++ b/libs/sigc++2/sigc++/functors/macros/ptr_fun.h.m4 @@ -0,0 +1,126 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([POINTER_FUNCTOR],[dnl +/** pointer_functor$1 wraps existing non-member functions with $1 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor$1. + * + * The following template arguments are used:dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of operator()().]) + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor$1 : public functor_base +{ + typedef T_return (*function_type)(LOOP(T_arg%1, $1)); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor$1() {} + + /** Constructs a pointer_functor$1 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor$1(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the function.]) + * @return The return value of the function invocation. + */ + T_return operator()(LOOP(typename type_trait::take _A_a%1, $1)) const + { return func_ptr_(LOOP(_A_a%1, $1)); } +}; + +]) + +define([PTR_FUN],[dnl +/** Creates a functor of type sigc::pointer_functor$1 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor$1 +ptr_fun[]ifelse($2,, $1)(T_return (*_A_func)(LOOP(T_arg%1,$1))) +{ return pointer_functor$1(_A_func); } + +]) + +divert(0) +__FIREWALL__ +#include +#include + +namespace sigc { + +/** @defgroup ptr_fun ptr_fun() + * ptr_fun() is used to convert a pointer to a function to a functor. + * If the function pointer is to an overloaded type, you must specify + * the types using template arguments starting with the first argument. + * It is not necessary to supply the return type. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::slot sl = sigc::ptr_fun(&foo); + * @endcode + * + * Use ptr_fun#() if there is an abiguity as to the number of arguments. + * + * @par Example: + * @code + * void foo(int) {} // choose this one + * void foo(float) {} + * void foo(int, int) {} + * sigc::slot sl = sigc::ptr_fun1(&foo); + * @endcode + * + * ptr_fun() can also be used to convert a pointer to a static member + * function to a functor, like so: + * + * @par Example: + * @code + * struct foo + * { + * static void bar(int) {} + * }; + * sigc::slot sl = sigc::ptr_fun(&foo::bar); + * @endcode + * + * @ingroup functors + */ + +FOR(0,CALL_SIZE,[[POINTER_FUNCTOR(%1)]])dnl + +// numbered ptr_fun +FOR(0,CALL_SIZE,[[PTR_FUN(%1)]])dnl + +// unnumbered ptr_fun +FOR(0,CALL_SIZE,[[PTR_FUN(%1,1)]])dnl + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/functors/macros/slot.h.m4 b/libs/sigc++2/sigc++/functors/macros/slot.h.m4 new file mode 100644 index 0000000000..f02041c96e --- /dev/null +++ b/libs/sigc++2/sigc++/functors/macros/slot.h.m4 @@ -0,0 +1,289 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([SLOT_N],[dnl +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()().dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p nil means no argument.]) + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot$1 + : public slot_base +{ +public: + typedef T_return result_type; +FOR(1, $1,[ typedef _R_(T_arg%1) arg%1_type_; +]) + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(LIST(rep_type*, LOOP(arg%1_type_, $1))); +#endif + + /** Invoke the contained functor unless slot is in blocking state.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the functor.]) + * @return The return value of the functor invocation. + */ + inline T_return operator()(LOOP(arg%1_type_ _A_a%1, $1)) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(LIST(slot_base::rep_, LOOP(_A_a%1, $1))); + return T_return(); + } + + inline slot$1() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot$1(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call$1::address(); + } + + slot$1(const slot$1& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot$1& operator=(const slot$1& src) + { slot_base::operator=(src); return *this; } +}; + +]) +define([SLOT],[dnl +ifelse($1, $2,[dnl +/** Convenience wrapper for the numbered sigc::slot# templates. + * Slots convert arbitrary functors to unified types which are opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()().dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of operator()(). The default @p nil means no argument.]) + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::slot s = sigc::ptr_fun(&foo); + * s(19); + * @endcode + * + * @ingroup slot + */ +template ],[dnl + +/** Convenience wrapper for the numbered sigc::slot$1 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for $1 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. +dnl * +dnl * @ingroup slot + */ +template ]) +class slot ifelse($1, $2,,[]) + : public slot$1 +{ +public: + typedef slot$1 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + +]) +define([SLOT_CALL],[dnl +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it().dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of call_it().]) + * + */ +template +struct slot_call$1 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the functor.]) + * @return The return values of the functor invocation. + */ + static T_return call_it(LIST(slot_rep* rep, LOOP(_R_(T_arg%1) a_%1, $1))) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep);dnl +ifelse($1,0,[ + return (typed_rep->functor_)(); +],[ + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES + (LOOP(a_%1, $1)); +])dnl + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +]) + +divert(0)dnl +__FIREWALL__ +#include +#include +#include +#include + +namespace sigc { + +namespace internal { + +/** A typed slot_rep. + * A typed slot_rep holds a functor that can be invoked from + * slot::operator()(). visit_each() is used to visit the functor's + * targets that inherit trackable recursively and register the + * notification callback. Consequently the slot_rep object will be + * notified when some referred object is destroyed or overwritten. + */ +template +struct typed_slot_rep : public slot_rep +{ + typedef typed_slot_rep self; + + /* Use an adaptor type so that arguments can be passed as const references + * through explicit template instantiation from slot_call#::call_it() */ + typedef typename adaptor_trait::adaptor_type adaptor_type; + + /** The functor contained by this slot_rep object. */ + adaptor_type functor_; + + /** Constructs an invalid typed slot_rep object. + * The notification callback is registered using visit_each(). + * @param functor The functor contained by the new slot_rep object. + */ + inline typed_slot_rep(const T_functor& functor) + : slot_rep(0, &destroy, &dup), functor_(functor) + { visit_each_type(slot_do_bind(this), functor_); } + + inline typed_slot_rep(const typed_slot_rep& cl) + : slot_rep(cl.call_, &destroy, &dup), functor_(cl.functor_) + { visit_each_type(slot_do_bind(this), functor_); } + + inline ~typed_slot_rep() + { + call_ = 0; + destroy_ = 0; + visit_each_type(slot_do_unbind(this), functor_); + } + + /** Detaches the stored functor from the other referred trackables and destroys it. + * This does not destroy the base slot_rep object. + */ + static void* destroy(void* data) + { + self* self_ = static_cast(reinterpret_cast(data)); + self_->call_ = 0; + self_->destroy_ = 0; + visit_each_type(slot_do_unbind(self_), self_->functor_); + self_->functor_.~adaptor_type(); + /* don't call disconnect() here: destroy() is either called + * a) from the parent itself (in which case disconnect() leads to a segfault) or + * b) from a parentless slot (in which case disconnect() does nothing) + */ + return 0; + } + + /** Makes a deep copy of the slot_rep object. + * Deep copy means that the notification callback of the new + * slot_rep object is registered in the referred trackables. + * @return A deep copy of the slot_rep object. + */ + static void* dup(void* data) + { + slot_rep* a_rep = reinterpret_cast(data); + return static_cast(new self(*static_cast(a_rep))); + } +}; + + +FOR(0,CALL_SIZE,[[SLOT_CALL(%1)]])dnl +} /* namespace internal */ + + +FOR(0,CALL_SIZE,[[SLOT_N(%1,CALL_SIZE)]]) +SLOT(CALL_SIZE,CALL_SIZE) +FOR(0,eval(CALL_SIZE-1),[[SLOT(%1,CALL_SIZE)]]) + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/functors/mem_fun.h b/libs/sigc++2/sigc++/functors/mem_fun.h new file mode 100644 index 0000000000..e652b7cf4b --- /dev/null +++ b/libs/sigc++2/sigc++/functors/mem_fun.h @@ -0,0 +1,6201 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + +// implementation notes: +// - we do not use bind here, because it would introduce +// an extra copy and complicate the header include order if bind is +// to have automatic conversion for member pointers. +#ifndef _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_ +#define _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_ +#include +#include +#include + +namespace sigc { + +/** @defgroup mem_fun mem_fun() + * mem_fun() is used to convert a pointer to a method to a functor. + * + * Optionally a reference or pointer to an object can be bound to the functor. + * Note that only if the object type inherits from sigc::trackable + * the slot is cleared automatically when the object goes out of scope! + * + * If the member function pointer is to an overloaded type, you must specify + * the types using template arguments starting with the first argument. + * It is not necessary to supply the return type. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) {} + * }; + * foo my_foo; + * sigc::slot sl = sigc::mem_fun(my_foo, &foo::bar); + * @endcode + * + * For const methods mem_fun() takes a const reference or pointer to an object. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) const {} + * }; + * const foo my_foo; + * sigc::slot sl = sigc::mem_fun(my_foo, &foo::bar); + * @endcode + * + * Use mem_fun#() if there is an abiguity as to the number of arguments. + * + * @par Example: + * @code + * struct foo : public sigc::trackable + * { + * void bar(int) {} + * void bar(float) {} + * void bar(int, int) {} + * }; + * foo my_foo; + * sigc::slot sl = sigc::mem_fun1(my_foo, &foo::bar); + * @endcode + * + * @ingroup functors + */ + +/** mem_functor0 wraps methods with 0 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor0 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)() ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor0() : func_ptr_(0) {} + + /** Constructs a mem_functor0 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor0(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj) const + { return (_A_obj->*(this->func_ptr_))(); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj) const + { return (_A_obj.*func_ptr_)(); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor1 wraps methods with 1 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor1 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor1() : func_ptr_(0) {} + + /** Constructs a mem_functor1 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor1(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj->*(this->func_ptr_))(_A_a1); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj.*func_ptr_)(_A_a1); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor2 wraps methods with 2 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor2 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor2() : func_ptr_(0) {} + + /** Constructs a mem_functor2 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor2(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor3 wraps methods with 3 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor3 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor3() : func_ptr_(0) {} + + /** Constructs a mem_functor3 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor3(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor4 wraps methods with 4 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor4 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor4() : func_ptr_(0) {} + + /** Constructs a mem_functor4 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor4(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor5 wraps methods with 5 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor5 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor5() : func_ptr_(0) {} + + /** Constructs a mem_functor5 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor5(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor6 wraps methods with 6 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor6 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor6() : func_ptr_(0) {} + + /** Constructs a mem_functor6 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor6(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +protected: + function_type func_ptr_; +}; + +/** mem_functor7 wraps methods with 7 argument(s). + * Use the convenience function mem_fun() to create an instance of mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class mem_functor7 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ; + typedef T_return result_type; + + /// Constructs an invalid functor. + mem_functor7() : func_ptr_(0) {} + + /** Constructs a mem_functor7 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit mem_functor7(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor0 wraps const methods with 0 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor0 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)() const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor0() : func_ptr_(0) {} + + /** Constructs a const_mem_functor0 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj) const + { return (_A_obj->*(this->func_ptr_))(); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj) const + { return (_A_obj.*func_ptr_)(); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor1 wraps const methods with 1 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor1 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor1() : func_ptr_(0) {} + + /** Constructs a const_mem_functor1 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj->*(this->func_ptr_))(_A_a1); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj.*func_ptr_)(_A_a1); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor2 wraps const methods with 2 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor2 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor2() : func_ptr_(0) {} + + /** Constructs a const_mem_functor2 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor3 wraps const methods with 3 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor3 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor3() : func_ptr_(0) {} + + /** Constructs a const_mem_functor3 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor4 wraps const methods with 4 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor4 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor4() : func_ptr_(0) {} + + /** Constructs a const_mem_functor4 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor5 wraps const methods with 5 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor5 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor5() : func_ptr_(0) {} + + /** Constructs a const_mem_functor5 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor6 wraps const methods with 6 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor6 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor6() : func_ptr_(0) {} + + /** Constructs a const_mem_functor6 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +protected: + function_type func_ptr_; +}; + +/** const_mem_functor7 wraps const methods with 7 argument(s). + * Use the convenience function mem_fun() to create an instance of const_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_mem_functor7 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_mem_functor7() : func_ptr_(0) {} + + /** Constructs a const_mem_functor7 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor0 wraps volatile methods with 0 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor0 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)() volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor0() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor0 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj) const + { return (_A_obj->*(this->func_ptr_))(); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj) const + { return (_A_obj.*func_ptr_)(); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor1 wraps volatile methods with 1 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor1 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor1() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor1 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj->*(this->func_ptr_))(_A_a1); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj.*func_ptr_)(_A_a1); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor2 wraps volatile methods with 2 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor2 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor2() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor2 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor3 wraps volatile methods with 3 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor3 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor3() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor3 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor4 wraps volatile methods with 4 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor4 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor4() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor4 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor5 wraps volatile methods with 5 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor5 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor5() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor5 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor6 wraps volatile methods with 6 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor6 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor6() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor6 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +protected: + function_type func_ptr_; +}; + +/** volatile_mem_functor7 wraps volatile methods with 7 argument(s). + * Use the convenience function mem_fun() to create an instance of volatile_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class volatile_mem_functor7 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + volatile_mem_functor7() : func_ptr_(0) {} + + /** Constructs a volatile_mem_functor7 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit volatile_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor0 wraps const volatile methods with 0 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor0 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)() const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor0() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor0 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj) const + { return (_A_obj->*(this->func_ptr_))(); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj) const + { return (_A_obj.*func_ptr_)(); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor1 wraps const volatile methods with 1 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor1 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor1() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor1 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj->*(this->func_ptr_))(_A_a1); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1) const + { return (_A_obj.*func_ptr_)(_A_a1); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor2 wraps const volatile methods with 2 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor2 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor2() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor2 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor3 wraps const volatile methods with 3 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor3 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor3() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor3 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor4 wraps const volatile methods with 4 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor4 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor4() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor4 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor5 wraps const volatile methods with 5 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor5 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor5() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor5 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor6 wraps const volatile methods with 6 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor6 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor6() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor6 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +protected: + function_type func_ptr_; +}; + +/** const_volatile_mem_functor7 wraps const volatile methods with 7 argument(s). + * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class const_volatile_mem_functor7 : public functor_base +{ +public: + typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile; + typedef T_return result_type; + + /// Constructs an invalid functor. + const_volatile_mem_functor7() : func_ptr_(0) {} + + /** Constructs a const_volatile_mem_functor7 object that wraps the passed method. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + explicit const_volatile_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {} + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Pointer to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj* _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Execute the wrapped method operating on the passed instance. + * @param _A_obj Reference to instance the method should operate on. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(const T_obj& _A_obj, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +protected: + function_type func_ptr_; +}; + + +/** bound_mem_functor0 encapsulates a method with 0 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor0 + : public mem_functor0 +{ + typedef mem_functor0 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor0 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor0( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor0 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor0( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @return The return value of the method invocation. + */ + T_return operator()() const + { return (obj_.invoke().*(this->func_ptr_))(); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor0& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor1 encapsulates a method with 1 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor1 + : public mem_functor1 +{ + typedef mem_functor1 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor1 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor1( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor1 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor1( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor1& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor2 encapsulates a method with 2 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor2 + : public mem_functor2 +{ + typedef mem_functor2 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor2 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor2( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor2 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor2( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor2& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor3 encapsulates a method with 3 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor3 + : public mem_functor3 +{ + typedef mem_functor3 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor3 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor3( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor3 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor3( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor3& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor4 encapsulates a method with 4 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor4 + : public mem_functor4 +{ + typedef mem_functor4 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor4 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor4( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor4 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor4( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor4& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor5 encapsulates a method with 5 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor5 + : public mem_functor5 +{ + typedef mem_functor5 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor5 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor5( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor5 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor5( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor5& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor6 encapsulates a method with 6 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor6 + : public mem_functor6 +{ + typedef mem_functor6 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor6 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor6( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor6 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor6( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor6& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_mem_functor7 encapsulates a method with 7 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_mem_functor7 + : public mem_functor7 +{ + typedef mem_functor7 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_mem_functor7 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor7( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_mem_functor7 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_mem_functor7( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_mem_functor performs a functor + * on the object instance stored in the sigc::bound_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_mem_functor7& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor0 encapsulates a const method with 0 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor0 + : public const_mem_functor0 +{ + typedef const_mem_functor0 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor0 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor0(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor0 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor0(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @return The return value of the method invocation. + */ + T_return operator()() const + { return (obj_.invoke().*(this->func_ptr_))(); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor0& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor1 encapsulates a const method with 1 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor1 + : public const_mem_functor1 +{ + typedef const_mem_functor1 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor1 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor1(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor1 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor1(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor1& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor2 encapsulates a const method with 2 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor2 + : public const_mem_functor2 +{ + typedef const_mem_functor2 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor2 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor2(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor2 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor2(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor2& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor3 encapsulates a const method with 3 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor3 + : public const_mem_functor3 +{ + typedef const_mem_functor3 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor3 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor3(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor3 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor3(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor3& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor4 encapsulates a const method with 4 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor4 + : public const_mem_functor4 +{ + typedef const_mem_functor4 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor4 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor4(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor4 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor4(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor4& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor5 encapsulates a const method with 5 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor5 + : public const_mem_functor5 +{ + typedef const_mem_functor5 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor5 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor5(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor5 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor5(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor5& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor6 encapsulates a const method with 6 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor6 + : public const_mem_functor6 +{ + typedef const_mem_functor6 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor6 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor6(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor6 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor6(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor6& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_mem_functor7 encapsulates a const method with 7 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_mem_functor7 + : public const_mem_functor7 +{ + typedef const_mem_functor7 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_mem_functor7 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor7(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_mem_functor7 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_mem_functor7(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_mem_functor7& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor0 encapsulates a volatile method with 0 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor0 + : public volatile_mem_functor0 +{ + typedef volatile_mem_functor0 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor0 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor0( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor0 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor0( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @return The return value of the method invocation. + */ + T_return operator()() const + { return (obj_.invoke().*(this->func_ptr_))(); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor0& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor1 encapsulates a volatile method with 1 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor1 + : public volatile_mem_functor1 +{ + typedef volatile_mem_functor1 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor1 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor1( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor1 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor1( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor1& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor2 encapsulates a volatile method with 2 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor2 + : public volatile_mem_functor2 +{ + typedef volatile_mem_functor2 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor2 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor2( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor2 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor2( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor2& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor3 encapsulates a volatile method with 3 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor3 + : public volatile_mem_functor3 +{ + typedef volatile_mem_functor3 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor3 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor3( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor3 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor3( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor3& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor4 encapsulates a volatile method with 4 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor4 + : public volatile_mem_functor4 +{ + typedef volatile_mem_functor4 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor4 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor4( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor4 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor4( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor4& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor5 encapsulates a volatile method with 5 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor5 + : public volatile_mem_functor5 +{ + typedef volatile_mem_functor5 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor5 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor5( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor5 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor5( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor5& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor6 encapsulates a volatile method with 6 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor6 + : public volatile_mem_functor6 +{ + typedef volatile_mem_functor6 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor6 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor6( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor6 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor6( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor6& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_volatile_mem_functor7 encapsulates a volatile method with 7 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_volatile_mem_functor7 + : public volatile_mem_functor7 +{ + typedef volatile_mem_functor7 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_volatile_mem_functor7 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor7( T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_volatile_mem_functor7 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_volatile_mem_functor7( T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_volatile_mem_functor7& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor0 encapsulates a const volatile method with 0 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor0 + : public const_volatile_mem_functor0 +{ + typedef const_volatile_mem_functor0 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor0 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor0(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor0 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor0(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @return The return value of the method invocation. + */ + T_return operator()() const + { return (obj_.invoke().*(this->func_ptr_))(); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor0& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor1 encapsulates a const volatile method with 1 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor1 + : public const_volatile_mem_functor1 +{ + typedef const_volatile_mem_functor1 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor1 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor1(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor1 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor1(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor1& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor2 encapsulates a const volatile method with 2 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor2 + : public const_volatile_mem_functor2 +{ + typedef const_volatile_mem_functor2 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor2 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor2(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor2 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor2(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor2& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor3 encapsulates a const volatile method with 3 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor3 + : public const_volatile_mem_functor3 +{ + typedef const_volatile_mem_functor3 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor3 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor3(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor3 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor3(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor3& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor4 encapsulates a const volatile method with 4 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor4 + : public const_volatile_mem_functor4 +{ + typedef const_volatile_mem_functor4 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor4 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor4(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor4 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor4(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor4& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor5 encapsulates a const volatile method with 5 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor5 + : public const_volatile_mem_functor5 +{ + typedef const_volatile_mem_functor5 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor5 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor5(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor5 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor5(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor5& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor6 encapsulates a const volatile method with 6 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor6 + : public const_volatile_mem_functor6 +{ + typedef const_volatile_mem_functor6 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor6 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor6(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor6 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor6(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor6& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +/** bound_const_volatile_mem_functor7 encapsulates a const volatile method with 7 arguments and an object instance. + * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * - @e T_obj The object type. + * + * @ingroup mem_fun + */ +template +class bound_const_volatile_mem_functor7 + : public const_volatile_mem_functor7 +{ + typedef const_volatile_mem_functor7 base_type_; +public: + typedef typename base_type_::function_type function_type; + + /** Constructs a bound_const_volatile_mem_functor7 object that wraps the passed method. + * @param _A_obj Pointer to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor7(const T_obj* _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(*_A_obj) + {} + + /** Constructs a bound_const_volatile_mem_functor7 object that wraps the passed method. + * @param _A_obj Reference to instance the method will operate on. + * @param _A_func Pointer to method will be invoked from operator()(). + */ + bound_const_volatile_mem_functor7(const T_obj& _A_obj, function_type _A_func) + : base_type_(_A_func), + obj_(_A_obj) + {} + + /** Execute the wrapped method operating on the stored instance. + * @param _A_a1 Argument to be passed on to the method. + * @param _A_a2 Argument to be passed on to the method. + * @param _A_a3 Argument to be passed on to the method. + * @param _A_a4 Argument to be passed on to the method. + * @param _A_a5 Argument to be passed on to the method. + * @param _A_a6 Argument to be passed on to the method. + * @param _A_a7 Argument to be passed on to the method. + * @return The return value of the method invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + +//protected: + // Reference to stored object instance. + // This is the handler object, such as TheObject in void TheObject::signal_handler(). + const_volatile_limit_reference obj_; +}; + +//template specialization of visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_const_volatile_mem_functor performs a functor + * on the object instance stored in the sigc::bound_const_volatile_mem_functor object. + * + * @ingroup mem_fun + */ +template +void visit_each(const T_action& _A_action, + const bound_const_volatile_mem_functor7& _A_target) +{ + sigc::visit_each(_A_action, _A_target.obj_); +} + + +// numbered +/** Creates a functor of type sigc::mem_functor0 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor0 +mem_fun0(T_return (T_obj::*_A_func)() ) +{ return mem_functor0(_A_func); } + +/** Creates a functor of type sigc::mem_functor1 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor1 +mem_fun1(T_return (T_obj::*_A_func)(T_arg1) ) +{ return mem_functor1(_A_func); } + +/** Creates a functor of type sigc::mem_functor2 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor2 +mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) ) +{ return mem_functor2(_A_func); } + +/** Creates a functor of type sigc::mem_functor3 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor3 +mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return mem_functor3(_A_func); } + +/** Creates a functor of type sigc::mem_functor4 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor4 +mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return mem_functor4(_A_func); } + +/** Creates a functor of type sigc::mem_functor5 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor5 +mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return mem_functor5(_A_func); } + +/** Creates a functor of type sigc::mem_functor6 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor6 +mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return mem_functor6(_A_func); } + +/** Creates a functor of type sigc::mem_functor7 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor7 +mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return mem_functor7(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor0 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor0 +mem_fun0(T_return (T_obj::*_A_func)() const) +{ return const_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor1 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor1 +mem_fun1(T_return (T_obj::*_A_func)(T_arg1) const) +{ return const_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor2 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor2 +mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const) +{ return const_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor3 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor3 +mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return const_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor4 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor4 +mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return const_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor5 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor5 +mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return const_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor6 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor6 +mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return const_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor7 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor7 +mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return const_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor0 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor0 +mem_fun0(T_return (T_obj::*_A_func)() volatile) +{ return volatile_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor1 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor1 +mem_fun1(T_return (T_obj::*_A_func)(T_arg1) volatile) +{ return volatile_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor2 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor2 +mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile) +{ return volatile_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor3 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor3 +mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return volatile_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor4 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor4 +mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return volatile_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor5 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor5 +mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return volatile_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor6 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor6 +mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return volatile_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor7 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor7 +mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return volatile_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor0 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor0 +mem_fun0(T_return (T_obj::*_A_func)() const volatile) +{ return const_volatile_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor1 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor1 +mem_fun1(T_return (T_obj::*_A_func)(T_arg1) const volatile) +{ return const_volatile_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor2 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor2 +mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile) +{ return const_volatile_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor3 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor3 +mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return const_volatile_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor4 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor4 +mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return const_volatile_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor5 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor5 +mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return const_volatile_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor6 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor6 +mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return const_volatile_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor7 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor7 +mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return const_volatile_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor0 +mem_fun0(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() ) +{ return bound_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor0 +mem_fun0(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() ) +{ return bound_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor1 +mem_fun1(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) ) +{ return bound_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor1 +mem_fun1(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) ) +{ return bound_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor2 +mem_fun2(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) ) +{ return bound_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor2 +mem_fun2(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) ) +{ return bound_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor3 +mem_fun3(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return bound_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor3 +mem_fun3(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return bound_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor4 +mem_fun4(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return bound_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor4 +mem_fun4(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return bound_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor5 +mem_fun5(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return bound_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor5 +mem_fun5(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return bound_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor6 +mem_fun6(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return bound_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor6 +mem_fun6(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return bound_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor7 +mem_fun7(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return bound_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor7 +mem_fun7(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return bound_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor0 +mem_fun0(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const) +{ return bound_const_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor0 +mem_fun0(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const) +{ return bound_const_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor1 +mem_fun1(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const) +{ return bound_const_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor1 +mem_fun1(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const) +{ return bound_const_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor2 +mem_fun2(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const) +{ return bound_const_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor2 +mem_fun2(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const) +{ return bound_const_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor3 +mem_fun3(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return bound_const_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor3 +mem_fun3(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return bound_const_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor4 +mem_fun4(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return bound_const_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor4 +mem_fun4(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return bound_const_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor5 +mem_fun5(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return bound_const_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor5 +mem_fun5(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return bound_const_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor6 +mem_fun6(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return bound_const_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor6 +mem_fun6(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return bound_const_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor7 +mem_fun7(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return bound_const_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor7 +mem_fun7(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return bound_const_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor0 +mem_fun0(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() volatile) +{ return bound_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor0 +mem_fun0(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() volatile) +{ return bound_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor1 +mem_fun1(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile) +{ return bound_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor1 +mem_fun1(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile) +{ return bound_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor2 +mem_fun2(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile) +{ return bound_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor2 +mem_fun2(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile) +{ return bound_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor3 +mem_fun3(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return bound_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor3 +mem_fun3(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return bound_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor4 +mem_fun4(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return bound_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor4 +mem_fun4(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return bound_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor5 +mem_fun5(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return bound_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor5 +mem_fun5(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return bound_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor6 +mem_fun6(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return bound_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor6 +mem_fun6(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return bound_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor7 +mem_fun7(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return bound_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor7 +mem_fun7(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return bound_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor0 +mem_fun0(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const volatile) +{ return bound_const_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor0 +mem_fun0(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const volatile) +{ return bound_const_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor1 +mem_fun1(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile) +{ return bound_const_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor1 +mem_fun1(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile) +{ return bound_const_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor2 +mem_fun2(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile) +{ return bound_const_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor2 +mem_fun2(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile) +{ return bound_const_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor3 +mem_fun3(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return bound_const_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor3 +mem_fun3(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return bound_const_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor4 +mem_fun4(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return bound_const_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor4 +mem_fun4(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return bound_const_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor5 +mem_fun5(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return bound_const_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor5 +mem_fun5(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return bound_const_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor6 +mem_fun6(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return bound_const_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor6 +mem_fun6(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return bound_const_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor7 +mem_fun7(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return bound_const_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor7 +mem_fun7(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return bound_const_volatile_mem_functor7(_A_obj, _A_func); } + + +// unnumbered +/** Creates a functor of type sigc::mem_functor0 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor0 +mem_fun(T_return (T_obj::*_A_func)() ) +{ return mem_functor0(_A_func); } + +/** Creates a functor of type sigc::mem_functor1 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor1 +mem_fun(T_return (T_obj::*_A_func)(T_arg1) ) +{ return mem_functor1(_A_func); } + +/** Creates a functor of type sigc::mem_functor2 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor2 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) ) +{ return mem_functor2(_A_func); } + +/** Creates a functor of type sigc::mem_functor3 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor3 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return mem_functor3(_A_func); } + +/** Creates a functor of type sigc::mem_functor4 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor4 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return mem_functor4(_A_func); } + +/** Creates a functor of type sigc::mem_functor5 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor5 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return mem_functor5(_A_func); } + +/** Creates a functor of type sigc::mem_functor6 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor6 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return mem_functor6(_A_func); } + +/** Creates a functor of type sigc::mem_functor7 which wraps a method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline mem_functor7 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return mem_functor7(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor0 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor0 +mem_fun(T_return (T_obj::*_A_func)() const) +{ return const_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor1 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor1 +mem_fun(T_return (T_obj::*_A_func)(T_arg1) const) +{ return const_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor2 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor2 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const) +{ return const_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor3 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor3 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return const_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor4 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor4 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return const_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor5 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor5 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return const_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor6 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor6 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return const_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::const_mem_functor7 which wraps a const method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_mem_functor7 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return const_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor0 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor0 +mem_fun(T_return (T_obj::*_A_func)() volatile) +{ return volatile_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor1 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor1 +mem_fun(T_return (T_obj::*_A_func)(T_arg1) volatile) +{ return volatile_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor2 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor2 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile) +{ return volatile_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor3 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor3 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return volatile_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor4 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor4 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return volatile_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor5 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor5 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return volatile_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor6 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor6 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return volatile_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::volatile_mem_functor7 which wraps a volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline volatile_mem_functor7 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return volatile_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor0 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor0 +mem_fun(T_return (T_obj::*_A_func)() const volatile) +{ return const_volatile_mem_functor0(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor1 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor1 +mem_fun(T_return (T_obj::*_A_func)(T_arg1) const volatile) +{ return const_volatile_mem_functor1(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor2 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor2 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile) +{ return const_volatile_mem_functor2(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor3 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor3 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return const_volatile_mem_functor3(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor4 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor4 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return const_volatile_mem_functor4(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor5 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor5 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return const_volatile_mem_functor5(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor6 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor6 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return const_volatile_mem_functor6(_A_func); } + +/** Creates a functor of type sigc::const_volatile_mem_functor7 which wraps a const volatile method. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline const_volatile_mem_functor7 +mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return const_volatile_mem_functor7(_A_func); } + +/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor0 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() ) +{ return bound_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor0 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() ) +{ return bound_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor1 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) ) +{ return bound_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor1 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) ) +{ return bound_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor2 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) ) +{ return bound_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor2 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) ) +{ return bound_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor3 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return bound_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor3 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) ) +{ return bound_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor4 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return bound_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor4 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) ) +{ return bound_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor5 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return bound_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor5 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ) +{ return bound_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor6 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return bound_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor6 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ) +{ return bound_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor7 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return bound_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_mem_functor7 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ) +{ return bound_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor0 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const) +{ return bound_const_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor0 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const) +{ return bound_const_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor1 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const) +{ return bound_const_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor1 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const) +{ return bound_const_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor2 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const) +{ return bound_const_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor2 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const) +{ return bound_const_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor3 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return bound_const_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor3 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const) +{ return bound_const_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor4 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return bound_const_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor4 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const) +{ return bound_const_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor5 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return bound_const_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor5 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const) +{ return bound_const_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor6 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return bound_const_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor6 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const) +{ return bound_const_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor7 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return bound_const_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_mem_functor7 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const) +{ return bound_const_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor0 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() volatile) +{ return bound_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor0 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() volatile) +{ return bound_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor1 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile) +{ return bound_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor1 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile) +{ return bound_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor2 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile) +{ return bound_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor2 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile) +{ return bound_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor3 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return bound_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor3 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile) +{ return bound_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor4 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return bound_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor4 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile) +{ return bound_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor5 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return bound_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor5 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile) +{ return bound_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor6 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return bound_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor6 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile) +{ return bound_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor7 +mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return bound_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_volatile_mem_functor7 +mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile) +{ return bound_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor0 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const volatile) +{ return bound_const_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor0 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const volatile) +{ return bound_const_volatile_mem_functor0(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor1 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile) +{ return bound_const_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor1 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile) +{ return bound_const_volatile_mem_functor1(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor2 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile) +{ return bound_const_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor2 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile) +{ return bound_const_volatile_mem_functor2(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor3 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return bound_const_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor3 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile) +{ return bound_const_volatile_mem_functor3(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor4 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return bound_const_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor4 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile) +{ return bound_const_volatile_mem_functor4(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor5 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return bound_const_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor5 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile) +{ return bound_const_volatile_mem_functor5(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor6 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return bound_const_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor6 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile) +{ return bound_const_volatile_mem_functor6(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Pointer to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor7 +mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return bound_const_volatile_mem_functor7(_A_obj, _A_func); } + +/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance. + * @param _A_obj Reference to object instance the functor should operate on. + * @param _A_func Pointer to method that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup mem_fun + */ +template +inline bound_const_volatile_mem_functor7 +mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile) +{ return bound_const_volatile_mem_functor7(_A_obj, _A_func); } + + +} /* namespace sigc */ +#endif /* _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_ */ diff --git a/libs/sigc++2/sigc++/functors/ptr_fun.h b/libs/sigc++2/sigc++/functors/ptr_fun.h new file mode 100644 index 0000000000..5ab6b5ab96 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/ptr_fun.h @@ -0,0 +1,542 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + +#ifndef _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_ +#define _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_ +#include +#include + +namespace sigc { + +/** @defgroup ptr_fun ptr_fun() + * ptr_fun() is used to convert a pointer to a function to a functor. + * If the function pointer is to an overloaded type, you must specify + * the types using template arguments starting with the first argument. + * It is not necessary to supply the return type. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::slot sl = sigc::ptr_fun(&foo); + * @endcode + * + * Use ptr_fun#() if there is an abiguity as to the number of arguments. + * + * @par Example: + * @code + * void foo(int) {} // choose this one + * void foo(float) {} + * void foo(int, int) {} + * sigc::slot sl = sigc::ptr_fun1(&foo); + * @endcode + * + * ptr_fun() can also be used to convert a pointer to a static member + * function to a functor, like so: + * + * @par Example: + * @code + * struct foo + * { + * static void bar(int) {} + * }; + * sigc::slot sl = sigc::ptr_fun(&foo::bar); + * @endcode + * + * @ingroup functors + */ + +/** pointer_functor0 wraps existing non-member functions with 0 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor0. + * + * The following template arguments are used: + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor0 : public functor_base +{ + typedef T_return (*function_type)(); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor0() {} + + /** Constructs a pointer_functor0 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor0(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @return The return value of the function invocation. + */ + T_return operator()() const + { return func_ptr_(); } +}; + +/** pointer_functor1 wraps existing non-member functions with 1 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor1. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor1 : public functor_base +{ + typedef T_return (*function_type)(T_arg1); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor1() {} + + /** Constructs a pointer_functor1 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1) const + { return func_ptr_(_A_a1); } +}; + +/** pointer_functor2 wraps existing non-member functions with 2 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor2. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor2 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor2() {} + + /** Constructs a pointer_functor2 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor2(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return func_ptr_(_A_a1,_A_a2); } +}; + +/** pointer_functor3 wraps existing non-member functions with 3 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor3. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor3 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor3() {} + + /** Constructs a pointer_functor3 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor3(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @param _A_a3 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return func_ptr_(_A_a1,_A_a2,_A_a3); } +}; + +/** pointer_functor4 wraps existing non-member functions with 4 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor4. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor4 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor4() {} + + /** Constructs a pointer_functor4 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor4(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @param _A_a3 Argument to be passed on to the function. + * @param _A_a4 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4); } +}; + +/** pointer_functor5 wraps existing non-member functions with 5 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor5. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor5 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor5() {} + + /** Constructs a pointer_functor5 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor5(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @param _A_a3 Argument to be passed on to the function. + * @param _A_a4 Argument to be passed on to the function. + * @param _A_a5 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } +}; + +/** pointer_functor6 wraps existing non-member functions with 6 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor6. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor6 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor6() {} + + /** Constructs a pointer_functor6 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor6(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @param _A_a3 Argument to be passed on to the function. + * @param _A_a4 Argument to be passed on to the function. + * @param _A_a5 Argument to be passed on to the function. + * @param _A_a6 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } +}; + +/** pointer_functor7 wraps existing non-member functions with 7 argument(s). + * Use the convenience function ptr_fun() to create an instance of pointer_functor7. + * + * The following template arguments are used: + * - @e T_arg1 Argument type used in the definition of operator()(). + * - @e T_arg2 Argument type used in the definition of operator()(). + * - @e T_arg3 Argument type used in the definition of operator()(). + * - @e T_arg4 Argument type used in the definition of operator()(). + * - @e T_arg5 Argument type used in the definition of operator()(). + * - @e T_arg6 Argument type used in the definition of operator()(). + * - @e T_arg7 Argument type used in the definition of operator()(). + * - @e T_return The return type of operator()(). + * + * @ingroup ptr_fun + */ +template +class pointer_functor7 : public functor_base +{ + typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7); +protected: + function_type func_ptr_; +public: + typedef T_return result_type; + + /// Constructs an invalid functor. + pointer_functor7() {} + + /** Constructs a pointer_functor7 object that wraps an existing function. + * @param _A_func Pointer to function that will be invoked from operator()(). + */ + explicit pointer_functor7(function_type _A_func): func_ptr_(_A_func) {} + + /** Execute the wrapped function. + * @param _A_a1 Argument to be passed on to the function. + * @param _A_a2 Argument to be passed on to the function. + * @param _A_a3 Argument to be passed on to the function. + * @param _A_a4 Argument to be passed on to the function. + * @param _A_a5 Argument to be passed on to the function. + * @param _A_a6 Argument to be passed on to the function. + * @param _A_a7 Argument to be passed on to the function. + * @return The return value of the function invocation. + */ + T_return operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } +}; + + +// numbered ptr_fun +/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor0 +ptr_fun0(T_return (*_A_func)()) +{ return pointer_functor0(_A_func); } + +/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor1 +ptr_fun1(T_return (*_A_func)(T_arg1)) +{ return pointer_functor1(_A_func); } + +/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor2 +ptr_fun2(T_return (*_A_func)(T_arg1,T_arg2)) +{ return pointer_functor2(_A_func); } + +/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor3 +ptr_fun3(T_return (*_A_func)(T_arg1,T_arg2,T_arg3)) +{ return pointer_functor3(_A_func); } + +/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor4 +ptr_fun4(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4)) +{ return pointer_functor4(_A_func); } + +/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor5 +ptr_fun5(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5)) +{ return pointer_functor5(_A_func); } + +/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor6 +ptr_fun6(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6)) +{ return pointer_functor6(_A_func); } + +/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor7 +ptr_fun7(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7)) +{ return pointer_functor7(_A_func); } + + +// unnumbered ptr_fun +/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor0 +ptr_fun(T_return (*_A_func)()) +{ return pointer_functor0(_A_func); } + +/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor1 +ptr_fun(T_return (*_A_func)(T_arg1)) +{ return pointer_functor1(_A_func); } + +/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor2 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2)) +{ return pointer_functor2(_A_func); } + +/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor3 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3)) +{ return pointer_functor3(_A_func); } + +/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor4 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4)) +{ return pointer_functor4(_A_func); } + +/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor5 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5)) +{ return pointer_functor5(_A_func); } + +/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor6 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6)) +{ return pointer_functor6(_A_func); } + +/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function. + * @param _A_func Pointer to function that should be wrapped. + * @return Functor that executes @e _A_func on invokation. + * + * @ingroup ptr_fun + */ +template +inline pointer_functor7 +ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7)) +{ return pointer_functor7(_A_func); } + + +} /* namespace sigc */ +#endif /* _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_ */ diff --git a/libs/sigc++2/sigc++/functors/slot.cc b/libs/sigc++2/sigc++/functors/slot.cc new file mode 100644 index 0000000000..5b9c92e201 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/slot.cc @@ -0,0 +1,25 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include + +namespace sigc { + + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/functors/slot.h b/libs/sigc++2/sigc++/functors/slot.h new file mode 100644 index 0000000000..712940a7f5 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/slot.h @@ -0,0 +1,1301 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_FUNCTORS_MACROS_SLOTHM4_ +#define _SIGC_FUNCTORS_MACROS_SLOTHM4_ +#include +#include +#include +#include + +namespace sigc { + +namespace internal { + +/** A typed slot_rep. + * A typed slot_rep holds a functor that can be invoked from + * slot::operator()(). visit_each() is used to visit the functor's + * targets that inherit trackable recursively and register the + * notification callback. Consequently the slot_rep object will be + * notified when some referred object is destroyed or overwritten. + */ +template +struct typed_slot_rep : public slot_rep +{ + typedef typed_slot_rep self; + + /* Use an adaptor type so that arguments can be passed as const references + * through explicit template instantiation from slot_call#::call_it() */ + typedef typename adaptor_trait::adaptor_type adaptor_type; + + /** The functor contained by this slot_rep object. */ + adaptor_type functor_; + + /** Constructs an invalid typed slot_rep object. + * The notification callback is registered using visit_each(). + * @param functor The functor contained by the new slot_rep object. + */ + inline typed_slot_rep(const T_functor& functor) + : slot_rep(0, &destroy, &dup), functor_(functor) + { visit_each_type(slot_do_bind(this), functor_); } + + inline typed_slot_rep(const typed_slot_rep& cl) + : slot_rep(cl.call_, &destroy, &dup), functor_(cl.functor_) + { visit_each_type(slot_do_bind(this), functor_); } + + inline ~typed_slot_rep() + { + call_ = 0; + destroy_ = 0; + visit_each_type(slot_do_unbind(this), functor_); + } + + /** Detaches the stored functor from the other referred trackables and destroys it. + * This does not destroy the base slot_rep object. + */ + static void* destroy(void* data) + { + self* self_ = static_cast(reinterpret_cast(data)); + self_->call_ = 0; + self_->destroy_ = 0; + visit_each_type(slot_do_unbind(self_), self_->functor_); + self_->functor_.~adaptor_type(); + /* don't call disconnect() here: destroy() is either called + * a) from the parent itself (in which case disconnect() leads to a segfault) or + * b) from a parentless slot (in which case disconnect() does nothing) + */ + return 0; + } + + /** Makes a deep copy of the slot_rep object. + * Deep copy means that the notification callback of the new + * slot_rep object is registered in the referred trackables. + * @return A deep copy of the slot_rep object. + */ + static void* dup(void* data) + { + slot_rep* a_rep = reinterpret_cast(data); + return static_cast(new self(*static_cast(a_rep))); + } +}; + + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * + */ +template +struct slot_call0 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_)(); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call1 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take> + (a_1); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call2 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take> + (a_1,a_2); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * - @e T_arg3 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call3 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2,typename type_trait::take a_3) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take> + (a_1,a_2,a_3); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * - @e T_arg3 Argument type used in the definition of call_it(). + * - @e T_arg4 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call4 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2,typename type_trait::take a_3,typename type_trait::take a_4) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (a_1,a_2,a_3,a_4); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * - @e T_arg3 Argument type used in the definition of call_it(). + * - @e T_arg4 Argument type used in the definition of call_it(). + * - @e T_arg5 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call5 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2,typename type_trait::take a_3,typename type_trait::take a_4,typename type_trait::take a_5) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (a_1,a_2,a_3,a_4,a_5); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * - @e T_arg3 Argument type used in the definition of call_it(). + * - @e T_arg4 Argument type used in the definition of call_it(). + * - @e T_arg5 Argument type used in the definition of call_it(). + * - @e T_arg6 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call6 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @param _A_a6 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2,typename type_trait::take a_3,typename type_trait::take a_4,typename type_trait::take a_5,typename type_trait::take a_6) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (a_1,a_2,a_3,a_4,a_5,a_6); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +/** Abstracts functor execution. + * call_it() invokes a functor of type @e T_functor with a list of + * parameters whose types are given by the template arguments. + * address() forms a function pointer from call_it(). + * + * The following template arguments are used: + * - @e T_functor The functor type. + * - @e T_return The return type of call_it(). + * - @e T_arg1 Argument type used in the definition of call_it(). + * - @e T_arg2 Argument type used in the definition of call_it(). + * - @e T_arg3 Argument type used in the definition of call_it(). + * - @e T_arg4 Argument type used in the definition of call_it(). + * - @e T_arg5 Argument type used in the definition of call_it(). + * - @e T_arg6 Argument type used in the definition of call_it(). + * - @e T_arg7 Argument type used in the definition of call_it(). + * + */ +template +struct slot_call7 +{ + /** Invokes a functor of type @p T_functor. + * @param rep slot_rep object that holds a functor of type @p T_functor. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @param _A_a6 Argument to be passed on to the functor. + * @param _A_a7 Argument to be passed on to the functor. + * @return The return values of the functor invocation. + */ + static T_return call_it(slot_rep* rep, typename type_trait::take a_1,typename type_trait::take a_2,typename type_trait::take a_3,typename type_trait::take a_4,typename type_trait::take a_5,typename type_trait::take a_6,typename type_trait::take a_7) + { + typedef typed_slot_rep typed_slot; + typed_slot *typed_rep = static_cast(rep); + return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> + (a_1,a_2,a_3,a_4,a_5,a_6,a_7); + } + + /** Forms a function pointer from call_it(). + * @return A function pointer formed from call_it(). + */ + static hook address() + { return reinterpret_cast(&call_it); } +}; + +} /* namespace internal */ + + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot0 + : public slot_base +{ +public: + typedef T_return result_type; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @return The return value of the functor invocation. + */ + inline T_return operator()() const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_); + return T_return(); + } + + inline slot0() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot0(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call0::address(); + } + + slot0(const slot0& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot0& operator=(const slot0& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot1 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1); + return T_return(); + } + + inline slot1() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot1(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call1::address(); + } + + slot1(const slot1& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot1& operator=(const slot1& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot2 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2); + return T_return(); + } + + inline slot2() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot2(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call2::address(); + } + + slot2(const slot2& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot2& operator=(const slot2& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot3 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + typedef typename type_trait::take arg3_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3); + return T_return(); + } + + inline slot3() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot3(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call3::address(); + } + + slot3(const slot3& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot3& operator=(const slot3& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot4 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + typedef typename type_trait::take arg3_type_; + typedef typename type_trait::take arg4_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4); + return T_return(); + } + + inline slot4() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot4(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call4::address(); + } + + slot4(const slot4& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot4& operator=(const slot4& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot5 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + typedef typename type_trait::take arg3_type_; + typedef typename type_trait::take arg4_type_; + typedef typename type_trait::take arg5_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + return T_return(); + } + + inline slot5() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot5(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call5::address(); + } + + slot5(const slot5& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot5& operator=(const slot5& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot6 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + typedef typename type_trait::take arg3_type_; + typedef typename type_trait::take arg4_type_; + typedef typename type_trait::take arg5_type_; + typedef typename type_trait::take arg6_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @param _A_a6 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + return T_return(); + } + + inline slot6() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot6(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call6::address(); + } + + slot6(const slot6& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot6& operator=(const slot6& src) + { slot_base::operator=(src); return *this; } +}; + +/** Converts an arbitrary functor to a unified type which is opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * You should use the more convenient unnumbered sigc::slot template. + * + * @ingroup slot + */ +/* TODO: Where put the following bit of information? I can't make any + * sense of the "because", by the way! + * + * Because slot is opaque, visit_each() will not visit its internal members. + */ +template +class slot7 + : public slot_base +{ +public: + typedef T_return result_type; + typedef typename type_trait::take arg1_type_; + typedef typename type_trait::take arg2_type_; + typedef typename type_trait::take arg3_type_; + typedef typename type_trait::take arg4_type_; + typedef typename type_trait::take arg5_type_; + typedef typename type_trait::take arg6_type_; + typedef typename type_trait::take arg7_type_; + + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + typedef internal::slot_rep rep_type; +public: + typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_,arg7_type_); +#endif + + /** Invoke the contained functor unless slot is in blocking state. + * @param _A_a1 Argument to be passed on to the functor. + * @param _A_a2 Argument to be passed on to the functor. + * @param _A_a3 Argument to be passed on to the functor. + * @param _A_a4 Argument to be passed on to the functor. + * @param _A_a5 Argument to be passed on to the functor. + * @param _A_a6 Argument to be passed on to the functor. + * @param _A_a7 Argument to be passed on to the functor. + * @return The return value of the functor invocation. + */ + inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6,arg7_type_ _A_a7) const + { + if (!empty() && !blocked()) + return (reinterpret_cast(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + return T_return(); + } + + inline slot7() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot7(const T_functor& _A_func) + : slot_base(new internal::typed_slot_rep(_A_func)) + { + //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. + slot_base::rep_->call_ = internal::slot_call7::address(); + } + + slot7(const slot7& src) + : slot_base(src) {} + + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot7& operator=(const slot7& src) + { slot_base::operator=(src); return *this; } +}; + + +/** Convenience wrapper for the numbered sigc::slot# templates. + * Slots convert arbitrary functors to unified types which are opaque. + * sigc::slot itself is a functor or to be more precise a closure. It contains + * a single, arbitrary functor (or closure) that is executed in operator()(). + * + * The template arguments determine the function signature of operator()(): + * - @e T_return The return type of operator()(). + * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument. + * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil means no argument. + * + * To use simply assign the slot to the desired functor. If the functor + * is not compatible with the parameter list defined with the template + * arguments compiler errors are triggered. When called the slot + * will invoke the functor with minimal copies. + * block() and unblock() can be used to block the functor's invocation + * from operator()() temporarily. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::slot s = sigc::ptr_fun(&foo); + * s(19); + * @endcode + * + * @ingroup slot + */ +template +class slot + : public slot7 +{ +public: + typedef slot7 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + + +/** Convenience wrapper for the numbered sigc::slot0 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 0 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot0 +{ +public: + typedef slot0 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot1 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 1 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot1 +{ +public: + typedef slot1 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot2 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 2 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot2 +{ +public: + typedef slot2 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot3 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 3 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot3 +{ +public: + typedef slot3 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot4 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 4 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot4 +{ +public: + typedef slot4 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot5 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 5 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot5 +{ +public: + typedef slot5 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + +/** Convenience wrapper for the numbered sigc::slot6 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::slot + * template for 6 argument(s), specialized for different numbers of arguments + * This is possible because the template has default (nil) template types. + */ +template +class slot + : public slot6 +{ +public: + typedef slot6 parent_type; + + inline slot() {} + + /** Constructs a slot from an arbitrary functor. + * @param _A_func The desirer functor the new slot should be assigned to. + */ + template + slot(const T_functor& _A_func) + : parent_type(_A_func) {} + + slot(const slot& src) + : parent_type(reinterpret_cast(src)) {} +}; + + + +} /* namespace sigc */ +#endif /* _SIGC_FUNCTORS_MACROS_SLOTHM4_ */ diff --git a/libs/sigc++2/sigc++/functors/slot_base.cc b/libs/sigc++2/sigc++/functors/slot_base.cc new file mode 100644 index 0000000000..896276bd1b --- /dev/null +++ b/libs/sigc++2/sigc++/functors/slot_base.cc @@ -0,0 +1,179 @@ +// -*- c++ -*- +/* + * Copyright 2003, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include + +namespace sigc +{ + +namespace internal { + +// only MSVC needs this to guarantee that all new/delete are executed from the DLL module +#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY +void* slot_rep::operator new(size_t size_) +{ + return malloc(size_); +} + +void slot_rep::operator delete(void* p) +{ + free(p); +} +#endif + +void slot_rep::disconnect() +{ + if (parent_) + { + call_ = 0; // Invalidate the slot. + // _Must_ be done here because parent_ might defer the actual + // destruction of the slot_rep and try to invoke it before that point. + void* data_ = parent_; + parent_ = 0; // Just a precaution. + (cleanup_)(data_); // Notify the parent (might lead to destruction of this!). + } + else + call_ = 0; +} + +//static +void* slot_rep::notify(void* data) +{ + slot_rep* self_ = reinterpret_cast(data); + + self_->call_ = 0; // Invalidate the slot. + self_->destroy(); // Detach the stored functor from the other referred trackables and destroy it. + self_->disconnect(); // Disconnect the slot (might lead to deletion of self_!). + + return 0; +} + +} // namespace internal + +slot_base::slot_base() +: rep_(0), + blocked_(false) +{} + +slot_base::slot_base(rep_type* rep) +: rep_(rep), + blocked_(false) +{} + +slot_base::slot_base(const slot_base& src) +: rep_(0), + blocked_(src.blocked_) +{ + if (src.rep_) + { + //Check call_ so we can ignore invalidated slots. + //Otherwise, destroyed bound reference parameters (whose destruction caused the slot's invalidation) may be used during dup(). + //Note: I'd prefer to check somewhere during dup(). murrayc. + if (src.rep_->call_) + rep_ = src.rep_->dup(); + else + { + *this = slot_base(); //Return the default invalid slot. + } + } +} + +slot_base::~slot_base() +{ + if (rep_) + delete rep_; +} + +slot_base::operator bool() const +{ + return rep_ != 0; +} + +slot_base& slot_base::operator=(const slot_base& src) +{ + if (src.rep_ == rep_) return *this; + + if (src.empty()) + { + disconnect(); + return *this; + } + + internal::slot_rep* new_rep_ = src.rep_->dup(); + + if (rep_) // Silently exchange the slot_rep. + { + new_rep_->set_parent(rep_->parent_, rep_->cleanup_); + delete rep_; + } + + rep_ = new_rep_; + + return *this; +} + +void slot_base::set_parent(void* parent, void* (*cleanup)(void*)) const +{ + if (rep_) + rep_->set_parent(parent, cleanup); +} + +void slot_base::add_destroy_notify_callback(void* data, func_destroy_notify func) const +{ + if (rep_) + rep_->add_destroy_notify_callback(data, func); +} + +void slot_base::remove_destroy_notify_callback(void* data) const +{ + if (rep_) + rep_->remove_destroy_notify_callback(data); +} + +bool slot_base::block(bool should_block) +{ + bool old = blocked_; + blocked_ = should_block; + return old; +} + +bool slot_base::unblock() +{ + return block(false); +} + +void slot_base::disconnect() +{ + if (rep_) + rep_->disconnect(); +} + + +/*bool slot_base::empty() const // having this function not inline is killing performance !!! +{ + if (rep_ && !rep_->call_) + { + delete rep_; // This is not strictly necessary here. I'm convinced that it is + rep_ = 0; // safe to wait for the destructor to delete the slot_rep. Martin. + } + return (rep_ == 0); +}*/ + +} //namespace sigc diff --git a/libs/sigc++2/sigc++/functors/slot_base.h b/libs/sigc++2/sigc++/functors/slot_base.h new file mode 100644 index 0000000000..a91c75db89 --- /dev/null +++ b/libs/sigc++2/sigc++/functors/slot_base.h @@ -0,0 +1,321 @@ +/* + * Copyright 2003, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_SLOT_BASE_HPP_ +#define _SIGC_SLOT_BASE_HPP_ + +#include +#include +#include + +namespace sigc +{ + +namespace internal { + +typedef void* (*hook)(void*); + +/** Internal representation of a slot. + * Derivations of this class can be considered as a link + * between a slot and the functor that the slot should + * execute in operator(). This link is needed because in + * libsigc++2 the slot doesn't necessarily have exactly the + * same function signature as the functor thus allowing for + * implicit conversions. + * The base class slot_rep serves the purpose to + * - form a common pointer type (slot_rep*), + * - offer the possibility to create duplicates (dup()), + * - offer a notification callback (notify()), + * - implement some of slot_base's interface that depends + * on the notification callback, i.e. + * -# the possibility to set a single parent with a callback + * (set_parent()) that is executed from notify(), + * -# a generic function pointer, call_, that is simply + * set to zero in notify() to invalidate the slot. + * slot_rep inherits trackable so that connection objects can + * refer to the slot and are notified when the slot is destroyed. + */ +struct SIGC_API slot_rep : public trackable +{ + /* NB: Instead of slot_rep we could inherit slot_base from trackable. + * However, a simple benchmark seems to indicate that this slows + * down dereferencing of slot list iterators. Martin. */ + + /// Callback that invokes the contained functor. + /* This can't be a virtual function since number of arguments + * must be flexible. We use function pointers to slot_call::call_it() + * instead. call_ is set to zero to indicate that the slot is invalid. + */ + hook call_; + + /// Callback that detaches the slot_rep object from referred trackables and destroys it. + /* This could be a replaced by a virtual dtor. However since this struct is + * crucual for the efficiency of the whole library we want to avoid this. + */ + hook destroy_; + + /** Callback that makes a deep copy of the slot_rep object. + * @return A deep copy of the slot_rep object. + */ + hook dup_; + + /** Callback of parent_. */ + hook cleanup_; + + /** Parent object whose callback cleanup_ is executed on notification. */ + void* parent_; + + inline slot_rep(hook call__, hook destroy__, hook dup__) + : call_(call__), destroy_(destroy__), dup_(dup__), cleanup_(0), parent_(0) {} + + inline ~slot_rep() + { destroy(); } + + // only MSVC needs this to guarantee that all new/delete are executed from the DLL module +#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY + void* operator new(size_t size_); + void operator delete(void* p); +#endif + + /** Destroys the slot_rep object (but doesn't delete it). + */ + inline void destroy() + { if (destroy_) (*destroy_)(this); } + + /** Makes a deep copy of the slot_rep object. + * @return A deep copy of the slot_rep object. + */ + inline slot_rep* dup() const + { return reinterpret_cast((*dup_)(const_cast(this))); } + + /** Set the parent with a callback. + * slots have one parent exclusively. + * @param parent The new parent. + * @param cleanup The callback to execute from notify(). + */ + inline void set_parent(void* parent, hook cleanup) + { + parent_ = parent; + cleanup_ = cleanup; + } + + /// Invalidates the slot and executes the parent's cleanup callback. + void disconnect(); + + /** Callback that invalidates the slot. + * This callback is registered in every object of a trackable + * inherited type that is referred by this slot_rep object. + * It is executed when the slot becomes invalid because of some + * referred object dying. + * @param data The slot_rep object that is becoming invalid (@p this). + */ + static void* notify(void* data); +}; + +/** Functor used to add a dependency to a trackable. + * Consequently slot_rep::notify() gets executed when the + * trackable is destroyed or overwritten. + */ +struct SIGC_API slot_do_bind +{ + /** The slot_rep object trackables should notify on destruction. */ + slot_rep* rep_; + + /** Construct a slot_do_bind functor. + * @param rep The slot_rep object trackables should notify on destruction. + */ + inline slot_do_bind(slot_rep* rep) : rep_(rep) {} + + /** Adds a dependency to @p t. + * @param t The trackable object to add a callback to. + */ + inline void operator()(const trackable* t) const + { t->add_destroy_notify_callback(rep_, &slot_rep::notify); } +}; + +/// Functor used to remove a dependency from a trackable. +struct SIGC_API slot_do_unbind +{ + /** The slot_rep object trackables don't need to notify on destruction any more. */ + slot_rep* rep_; + + /** Construct a slot_do_unbind functor. + * @param rep The slot_rep object trackables don't need to notify on destruction any more. + */ + inline slot_do_unbind(slot_rep* rep) : rep_(rep) {} + + /** Removes a dependency from @p t. + * @param t The trackable object to remove the callback from. + */ + inline void operator()(const trackable* t) const + { t->remove_destroy_notify_callback(rep_); } +}; + +} //namespace internal + + +/** @defgroup slot Slots + * Slots are type-safe representations of callback methods and functions. + * A Slot can be constructed from any function, regardless of whether it is a global function, + * a member method, static, or virtual. + * + * Use the sigc::mem_fun() and sigc::ptr_fun() template functions to get a sigc::slot, like so: + * + * @code + * sigc::slot sl = sigc::mem_fun(someobj,& SomeClass::somemethod); + * @endcode + * + * or + * + * @code + * sigc::slot sl = sigc::ptr_fun(&somefunction); + * @endcode + * + * or + * + * @code + * m_Button.signal_clicked().connect( sigc::mem_fun(*this, &MyWindow::on_button_clicked) ); + * @endcode + * + * The compiler will complain if SomeClass::somemethod, etc. have the wrong signature. + * + * You can also pass slots as method parameters where you might normally pass a function pointer. + * + * @ingroup functors + */ + +/** Base type for slots. + * slot_base integrates most of the interface of the derived + * sigc::slot templates. slots + * can be connected to signals, be disconnected at some later point + * (disconnect()) and temporarily be blocked (block(), unblock()). + * The validity of a slot can be tested with empty(). + * + * The internal representation of a sigc::internal::slot_rep derived + * type is built from slot_base's derivations. set_parent() is used to + * register a notification callback that is executed when the slot gets + * invalid. add_destroy_notify_callback() is used by connection objects + * to add a notification callback that is executed on destruction. + * + * @ingroup slot + */ +class SIGC_API slot_base : public functor_base +{ + typedef internal::slot_rep rep_type; + +public: + /// Constructs an empty slot. + slot_base(); + + /** Constructs a slot from an existing slot_rep object. + * @param rep The slot_rep object this slot should contain. + */ + explicit slot_base(rep_type* rep); + + /** Constructs a slot, copying an existing one. + * @param src The existing slot to copy. + */ + slot_base(const slot_base& src); + + ~slot_base(); + + /** Tests whether a slot is null, because the default constructor was used. + * Test a slot for null like so: + * @code + * if(slot) + * do_something() + * @endcode + */ + operator bool() const; + + /** Sets the parent of this slot. + * This function is used by signals to register a notification callback. + * This notification callback is executed when the slot becomes invalid + * because of some referred object dying. + * @param parent The new parent. + * @param cleanup The notification callback. + */ + void set_parent(void* parent, void* (*cleanup)(void*)) const; + + typedef trackable::func_destroy_notify func_destroy_notify; + /** Add a callback that is executed (notified) when the slot is detroyed. + * This function is used internally by connection objects. + * @param data Passed into func upon notification. + * @param func Callback executed upon destruction of the object. + */ + void add_destroy_notify_callback(void* data, func_destroy_notify func) const; + + /** Remove a callback previously installed with add_destroy_notify_callback(). + * The callback is not executed. + * @param data Parameter passed into previous call to add_destroy_notify_callback(). + */ + void remove_destroy_notify_callback(void* data) const; + + /** Returns whether the slot is invalid. + * @return @p true if the slot is invalid (empty). + */ + inline bool empty() const + { return (!rep_ || !rep_->call_); } + + /** Returns whether the slot is blocked. + * @return @p true if the slot is blocked. + */ + inline bool blocked() const + { return blocked_; } + + /** Sets the blocking state. + * If @e should_block is @p true then the blocking state is set. + * Subsequent calls to slot::operator()() don't invoke the functor + * contained by this slot until unblock() or block() with + * @e should_block = @p false is called. + * @param should_block Indicates whether the blocking state should be set or unset. + * @return @p true if the slot was in blocking state before. + */ + bool block(bool should_block = true); + + /** Unsets the blocking state. + * @return @p true if the slot was in blocking state before. + */ + bool unblock(); + + /** Disconnects the slot. + * Invalidates the slot and notifies the parent. + */ + void disconnect(); + +//The Tru64 and Solaris Forte 5.5 compilers needs this operator=() to be public. I'm not sure why, or why it needs to be protected usually. murrayc. +//See bug #168265. +//protected: + /** Overrides this slot making a copy from another slot. + * @param src The slot from which to make a copy. + * @return @p this. + */ + slot_base& operator=(const slot_base& src); + +public: // public to avoid template friend declarations + /** Typed slot_rep object that contains a functor. */ + mutable rep_type *rep_; + + /** Indicates whether the slot is blocked. */ + bool blocked_; +}; + +} //namespace sigc + +#endif //_SIGC_SLOT_BASE_HPP_ + diff --git a/libs/sigc++2/sigc++/hide.h b/libs/sigc++2/sigc++/hide.h new file mode 100644 index 0000000000..938faed1cb --- /dev/null +++ b/libs/sigc++2/sigc++/hide.h @@ -0,0 +1,6 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + +#ifndef _SIGC_MACROS_HIDEHM4_ +#define _SIGC_MACROS_HIDEHM4_ +#endif /* _SIGC_MACROS_HIDEHM4_ */ diff --git a/libs/sigc++2/sigc++/limit_reference.h b/libs/sigc++2/sigc++/limit_reference.h new file mode 100644 index 0000000000..0425429235 --- /dev/null +++ b/libs/sigc++2/sigc++/limit_reference.h @@ -0,0 +1,455 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + +#ifndef _SIGC_MACROS_LIMIT_REFERENCEHM4_ +#define _SIGC_MACROS_LIMIT_REFERENCEHM4_ + + +#include +#include + + +namespace sigc { + + +/** A limit_reference object stores a reference (Foo&), but make sure that, + * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the + * sigc::trackable reference instead of the derived reference. This avoids use of + * a reference to the derived type when the derived destructor has run. That can be + * a problem when using virtual inheritance. + * + * If Foo inherits from trackable then both the derived reference and the + * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable + * reference without doing an implicit conversion. To retrieve the derived reference + * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable + * reference (so that you can call visit_each() on it), you use visit(). + * + * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the + * derived reference. + * + * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values, + * and, with mem_fun(), the reference to the handling object. + * + * - @e T_type The type of the reference. + */ +template ::value> +class limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + limit_reference(T_type& _A_target) + : visited(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const T_type& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline T_type& invoke() const + { return visited; } + +private: + /** The reference. + */ + T_type& visited; +}; + +/** limit_reference object for a class that derives from trackable. + * - @e T_type The type of the reference. + */ +template +class limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + limit_reference(T_type& _A_target) + : visited(_A_target), + invoked(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const trackable& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline T_type& invoke() const + { return invoked; } + +private: + /** The trackable reference. + */ + trackable& visited; + + /** The reference. + */ + T_type& invoked; +}; + +/** Implementation of visit_each() specialized for the limit_reference + * class, to call visit_each() on the entity returned by the limit_reference's + * visit() method. + * - @e T_action The type of functor to invoke. + * - @e T_type The type of the reference. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const limit_reference& _A_target) +{ + visit_each(_A_action, _A_target.visit()); +} + + +/** A const_limit_reference object stores a reference (Foo&), but make sure that, + * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the + * sigc::trackable reference instead of the derived reference. This avoids use of + * a reference to the derived type when the derived destructor has run. That can be + * a problem when using virtual inheritance. + * + * If Foo inherits from trackable then both the derived reference and the + * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable + * reference without doing an implicit conversion. To retrieve the derived reference + * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable + * reference (so that you can call visit_each() on it), you use visit(). + * + * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the + * derived reference. + * + * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values, + * and, with mem_fun(), the reference to the handling object. + * + * - @e T_type The type of the reference. + */ +template ::value> +class const_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + const_limit_reference(const T_type& _A_target) + : visited(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const T_type& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline const T_type& invoke() const + { return visited; } + +private: + /** The reference. + */ + const T_type& visited; +}; + +/** const_limit_reference object for a class that derives from trackable. + * - @e T_type The type of the reference. + */ +template +class const_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + const_limit_reference(const T_type& _A_target) + : visited(_A_target), + invoked(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const trackable& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline const T_type& invoke() const + { return invoked; } + +private: + /** The trackable reference. + */ + const trackable& visited; + + /** The reference. + */ + const T_type& invoked; +}; + +/** Implementation of visit_each() specialized for the const_limit_reference + * class, to call visit_each() on the entity returned by the const_limit_reference's + * visit() method. + * - @e T_action The type of functor to invoke. + * - @e T_type The type of the reference. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const const_limit_reference& _A_target) +{ + visit_each(_A_action, _A_target.visit()); +} + + +/** A volatile_limit_reference object stores a reference (Foo&), but make sure that, + * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the + * sigc::trackable reference instead of the derived reference. This avoids use of + * a reference to the derived type when the derived destructor has run. That can be + * a problem when using virtual inheritance. + * + * If Foo inherits from trackable then both the derived reference and the + * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable + * reference without doing an implicit conversion. To retrieve the derived reference + * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable + * reference (so that you can call visit_each() on it), you use visit(). + * + * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the + * derived reference. + * + * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values, + * and, with mem_fun(), the reference to the handling object. + * + * - @e T_type The type of the reference. + */ +template ::value> +class volatile_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + volatile_limit_reference(T_type& _A_target) + : visited(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const T_type& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline volatile T_type& invoke() const + { return visited; } + +private: + /** The reference. + */ + T_type& visited; +}; + +/** volatile_limit_reference object for a class that derives from trackable. + * - @e T_type The type of the reference. + */ +template +class volatile_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + volatile_limit_reference(T_type& _A_target) + : visited(_A_target), + invoked(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const trackable& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline volatile T_type& invoke() const + { return invoked; } + +private: + /** The trackable reference. + */ + trackable& visited; + + /** The reference. + */ + T_type& invoked; +}; + +/** Implementation of visit_each() specialized for the volatile_limit_reference + * class, to call visit_each() on the entity returned by the volatile_limit_reference's + * visit() method. + * - @e T_action The type of functor to invoke. + * - @e T_type The type of the reference. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const volatile_limit_reference& _A_target) +{ + visit_each(_A_action, _A_target.visit()); +} + + +/** A const_volatile_limit_reference object stores a reference (Foo&), but make sure that, + * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the + * sigc::trackable reference instead of the derived reference. This avoids use of + * a reference to the derived type when the derived destructor has run. That can be + * a problem when using virtual inheritance. + * + * If Foo inherits from trackable then both the derived reference and the + * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable + * reference without doing an implicit conversion. To retrieve the derived reference + * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable + * reference (so that you can call visit_each() on it), you use visit(). + * + * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the + * derived reference. + * + * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values, + * and, with mem_fun(), the reference to the handling object. + * + * - @e T_type The type of the reference. + */ +template ::value> +class const_volatile_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + const_volatile_limit_reference(const T_type& _A_target) + : visited(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const T_type& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline const volatile T_type& invoke() const + { return visited; } + +private: + /** The reference. + */ + const T_type& visited; +}; + +/** const_volatile_limit_reference object for a class that derives from trackable. + * - @e T_type The type of the reference. + */ +template +class const_volatile_limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + const_volatile_limit_reference(const T_type& _A_target) + : visited(_A_target), + invoked(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const trackable& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline const volatile T_type& invoke() const + { return invoked; } + +private: + /** The trackable reference. + */ + const trackable& visited; + + /** The reference. + */ + const T_type& invoked; +}; + +/** Implementation of visit_each() specialized for the const_volatile_limit_reference + * class, to call visit_each() on the entity returned by the const_volatile_limit_reference's + * visit() method. + * - @e T_action The type of functor to invoke. + * - @e T_type The type of the reference. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const const_volatile_limit_reference& _A_target) +{ + visit_each(_A_action, _A_target.visit()); +} + + +} /* namespace sigc */ + + +#endif /* _SIGC_MACROS_LIMIT_REFERENCEHM4_ */ diff --git a/libs/sigc++2/sigc++/macros/class_slot.h.m4 b/libs/sigc++2/sigc++/macros/class_slot.h.m4 new file mode 100644 index 0000000000..16ca94b2fe --- /dev/null +++ b/libs/sigc++2/sigc++/macros/class_slot.h.m4 @@ -0,0 +1,27 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +divert(0) + +__FIREWALL__ + +#include +#include + diff --git a/libs/sigc++2/sigc++/macros/hide.h.m4 b/libs/sigc++2/sigc++/macros/hide.h.m4 new file mode 100644 index 0000000000..ff130623c8 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/hide.h.m4 @@ -0,0 +1,23 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +divert(0)dnl + +__FIREWALL__ diff --git a/libs/sigc++2/sigc++/macros/limit_reference.h.m4 b/libs/sigc++2/sigc++/macros/limit_reference.h.m4 new file mode 100644 index 0000000000..c40acc287d --- /dev/null +++ b/libs/sigc++2/sigc++/macros/limit_reference.h.m4 @@ -0,0 +1,158 @@ +dnl +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([LIMIT_REFERENCE],[dnl +/** A [$1]limit_reference object stores a reference (Foo&), but make sure that, + * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the + * sigc::trackable reference instead of the derived reference. This avoids use of + * a reference to the derived type when the derived destructor has run. That can be + * a problem when using virtual inheritance. + * + * If Foo inherits from trackable then both the derived reference and the + * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable + * reference without doing an implicit conversion. To retrieve the derived reference + * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable + * reference (so that you can call visit_each() on it), you use visit(). + * + * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the + * derived reference. + * + * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values, + * and, with mem_fun(), the reference to the handling object. + * + * - @e T_type The type of the reference. + */ +template ::value> +class [$1]limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + [$1]limit_reference([$2]T_type& _A_target) + : visited(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const T_type& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline [$3]T_type& invoke() const + { return visited; } + +private: + /** The reference. + */ + [$2]T_type& visited; +}; + +/** [$1]limit_reference object for a class that derives from trackable. + * - @e T_type The type of the reference. + */ +template +class [$1]limit_reference +{ +public: + /** Constructor. + * @param _A_target The reference to limit. + */ + [$1]limit_reference([$2]T_type& _A_target) + : visited(_A_target), + invoked(_A_target) + {} + + /** Retrieve the entity to visit for visit_each(). + * Depending on the template specialization, this is either a derived reference, or sigc::trackable& if T_type derives from sigc::trackable. + * @return The reference. + */ + inline const trackable& visit() const + { return visited; } + + /** Retrieve the reference. + * This is always a reference to the derived instance. + * @return The reference. + */ + inline [$3]T_type& invoke() const + { return invoked; } + +private: + /** The trackable reference. + */ + [$2]trackable& visited; + + /** The reference. + */ + [$2]T_type& invoked; +}; + +/** Implementation of visit_each() specialized for the [$1]limit_reference + * class, to call visit_each() on the entity returned by the [$1]limit_reference's + * visit() method. + * - @e T_action The type of functor to invoke. + * - @e T_type The type of the reference. + * @param _A_action The functor to invoke. + * @param _A_argument The visited instance. + */ +template +void +visit_each(const T_action& _A_action, + const [$1]limit_reference& _A_target) +{ + visit_each(_A_action, _A_target.visit()); +} +]) + +divert(0) + +__FIREWALL__ + + +#include +#include + + +namespace sigc { + + +LIMIT_REFERENCE([],[],[])dnl + + +LIMIT_REFERENCE([const_],[const ],[const ])dnl + + +LIMIT_REFERENCE([volatile_],[],[volatile ])dnl + + +LIMIT_REFERENCE([const_volatile_],[const ],[const volatile ])dnl + + +} /* namespace sigc */ + + diff --git a/libs/sigc++2/sigc++/macros/method_slot.h.m4 b/libs/sigc++2/sigc++/macros/method_slot.h.m4 new file mode 100644 index 0000000000..5729fcaec6 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/method_slot.h.m4 @@ -0,0 +1,23 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +divert(0) + +__FIREWALL__ diff --git a/libs/sigc++2/sigc++/macros/object_slot.h.m4 b/libs/sigc++2/sigc++/macros/object_slot.h.m4 new file mode 100644 index 0000000000..71640f4ffd --- /dev/null +++ b/libs/sigc++2/sigc++/macros/object_slot.h.m4 @@ -0,0 +1,22 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +divert(0) + diff --git a/libs/sigc++2/sigc++/macros/retype.h.m4 b/libs/sigc++2/sigc++/macros/retype.h.m4 new file mode 100644 index 0000000000..03ab0823d3 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/retype.h.m4 @@ -0,0 +1,75 @@ +dnl Copyright 2003, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([RETYPE_SLOT_OPERATOR],[dnl +ifelse($1,0,[dnl + T_return operator()(); +],[dnl + template + inline T_return operator()(LOOP(T_arg%1 _A_a%1, $1)) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline T_return sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1))); + } + #endif + +])dnl +]) +define([RETYPE_SLOT_VOID_OPERATOR],[dnl +ifelse($1,0,[dnl + void operator()(); +],[dnl + template + inline void operator()(LOOP(T_arg%1 _A_a%1, $1)) + { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1))); + } + + #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + template + inline void sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1)) + { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES::take, $1)> + (LOOP([[static_cast(_A_a%1)]], $1))); + } + #endif + +])dnl +]) +define([RETYPE],[dnl +template +inline Slot$1 +retype(const Slot$1& _A_slot) +{ return Slot$1 + (retype_slot_functor, T_return, LOOP(T_type%1, $1))> + (_A_slot)); } + +]) + +divert(0)dnl +__FIREWALL__ +#include +#include + diff --git a/libs/sigc++2/sigc++/macros/signal.h.m4 b/libs/sigc++2/sigc++/macros/signal.h.m4 new file mode 100644 index 0000000000..cc03a9e463 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/signal.h.m4 @@ -0,0 +1,1100 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +define([SIGNAL_EMIT_N],[dnl +/** Abstracts signal emission. + * This template implements the emit() function of signal$1. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit$1 +{ + typedef signal_emit$1 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + +ifelse($1,0,,[dnl + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ +])dnl + signal_emit$1(LOOP(typename type_trait::take _A_a%1, $1)) ifelse($1,0,,[ + : LOOP(_A_a%1_(_A_a%1), $1)]) {} + +ifelse($1,0,[dnl + /** Invokes a slot.],[ + /** Invokes a slot using the buffered parameter values.]) + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(LIST(_A_slot.rep_, LOOP(_A_a%1_, $1))); } +dnl T_return operator()(const slot_type& _A_slot) const +dnl { return _A_slot(LOOP(_A_a%1_, $1)); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator.dnl +ifelse($1,0,,[ + * The arguments are buffered in a temporary instance of signal_emit$1.]) +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self ifelse($1,0,,[(LOOP(_A_a%1, $1))]); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.dnl +ifelse($1,0,,[ + * The arguments are buffered in a temporary instance of signal_emit$1.]) +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self ifelse($1,0,,[(LOOP(_A_a%1, $1))]); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } +dnl + FOR(1, $1,[ + typename type_trait::take _A_a%1_;]) +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit$1 +{ + typedef signal_emit$1 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator.dnl +ifelse($1,0,,[ + * The arguments are passed directly on to the slots.]) + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + * @return The return value of the last slot invoked. + */ + static result_type emit(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.dnl +ifelse($1,0,,[ + * The arguments are passed directly on to the slots.]) + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit$1 +{ + typedef signal_emit$1 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef ifelse($1,0,void (*call_type)(slot_rep*),typename slot_type::call_type call_type); + + /** Executes a list of slots using an accumulator of type @e T_accumulator.dnl +ifelse($1,0,,[ + * The arguments are passed directly on to the slots.]) + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + */ + static result_type emit(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.dnl +ifelse($1,0,,[ + * The arguments are passed directly on to the slots.]) + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + */ + static result_type emit_reverse(LIST(signal_impl* impl, LOOP(typename type_trait::take _A_a%1, $1))) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(LIST(it->rep_, LOOP(_A_a%1, $1))); + } + } +}; + +]) +define([SIGNAL_N],[dnl +/** Signal declaration. + * signal$1 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of emit().]) + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal$1 + : public signal_base +{ +public: + typedef internal::signal_emit$1 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned.dnl +FOR(1, $1,[ + * @param _A_a%1 Argument to be passed on to the slots.]) + * @return The accumulated return values of the slot invocations. + */ + result_type emit(LOOP(typename type_trait::take _A_a%1, $1)) const + { return emitter_type::emit(LIST(impl_, LOOP(_A_a%1, $1))); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(LOOP(typename type_trait::take _A_a%1, $1)) const + { return emitter_type::emit_reverse(LIST(impl_, LOOP(_A_a%1, $1))); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(LOOP(typename type_trait::take _A_a%1, $1)) const + { return emit(LOOP(_A_a%1, $1)); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal$1::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor$1::take, $1))> make_slot() const + { return bound_const_mem_functor$1::take, $1))>(this, &signal$1::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal$1() {} + + signal$1(const signal$1& src) + : signal_base(src) {} +}; + +]) +define([SIGNAL],[dnl +ifelse($1, $2,[dnl +/** Convenience wrapper for the numbered sigc::signal# templates. + * signal can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitly. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The template arguments determine the function signature of + * the emit() function: + * - @e T_return The desired return type of the emit() function.dnl +FOR(1,$1,[ + * - @e T_arg%1 Argument type used in the definition of emit(). The default @p nil means no argument.]) + * + * To specify an accumulator type the nested class signal::accumulated can be used. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::signal sig; + * sig.connect(sigc::ptr_fun(&foo)); + * sig.emit(19); + * @endcode + * + * @ingroup signal + */ +template ],[dnl + +/** Convenience wrapper for the numbered sigc::signal$1 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for $1 argument(s). +ifelse($1, $2,[dnl + * + * @ingroup signal +])dnl + */ +template ]) +class signal ifelse($1, $2,,[]) + : public signal$1 +{ +public: +ifelse($1, $2,[dnl + /** Convenience wrapper for the numbered sigc::signal# templates. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + * + * An accumulator is a functor that uses a pair of special iterators + * to step through a list of slots and calculate a return value + * from the results of the slot invokations. The iterators' operator*() + * executes the slot. The return value is buffered, so that in an expression + * like @code a = (*i) * (*i); @endcode the slot is executed only once. + * The accumulator must define its return value as @p result_type. + * + * @par Example 1: + * This accumulator calculates the arithmetic mean value: + * @code + * struct arithmetic_mean_accumulator + * { + * typedef double result_type; + * template + * result_type operator()(T_iterator first, T_iterator last) const + * { + * result_type value_ = 0; + * int n_ = 0; + * for (; first != last; ++first, ++n_) + * value_ += *first; + * return value_ / n_; + * } + * }; + * @endcode + * + * @par Example 2: + * This accumulator stops signal emission when a slot returns zero: + * @code + * struct interruptable_accumulator + * { + * typedef bool result_type; + * template + * result_type operator()(T_iterator first, T_iterator last) const + * { + * for (; first != last; ++first, ++n_) + * if (!*first) return false; + * return true; + * } + * }; + * @endcode + * + * @ingroup signal +],[ + /** Convenience wrapper for the numbered sigc::signal$1 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. +])dnl + */ + template + class accumulated + : public signal$1 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal$1(src) {} + }; + + signal() {} + signal(const signal& src) + : signal$1(src) {} +}; + +]) + +divert(0) +#ifndef _SIGC_SIGNAL_H_ +#define _SIGC_SIGNAL_H_ + +#include +#include +#include +#include +#include +#include + +//SIGC_TYPEDEF_REDEFINE_ALLOWED: +// TODO: This should have its own test, but I can not create one that gives the error instead of just a warning. murrayc. +// I have just used this because there is a correlation between these two problems. +#ifdef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + //Compilers, such as older versions of SUN Forte C++, that do not allow this also often + //do not allow a typedef to have the same name as a class in the typedef's definition. + //For Sun Forte CC 5.7 (SUN Workshop 10), comment this out to fix the build. + #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 +#endif + +namespace sigc { + +/** STL-style iterator for slot_list. + * + * @ingroup signal + */ +template +struct slot_iterator +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_slot slot_type; + + typedef T_slot value_type; + typedef T_slot* pointer; + typedef T_slot& reference; + + typedef typename internal::signal_impl::iterator_type iterator_type; + + slot_iterator() + {} + + explicit slot_iterator(const iterator_type& i) + : i_(i) {} + + reference operator*() const + { return static_cast(*i_); } + + pointer operator->() const + { return &(operator*()); } + + slot_iterator& operator++() + { + ++i_; + return *this; + } + + slot_iterator operator++(int) + { + slot_iterator __tmp(*this); + ++i_; + return __tmp; + } + + slot_iterator& operator--() + { + --i_; + return *this; + } + + slot_iterator operator--(int) + { + slot_iterator __tmp(*this); + --i_; + return __tmp; + } + + bool operator == (const slot_iterator& other) const + { return i_ == other.i_; } + + bool operator != (const slot_iterator& other) const + { return i_ != other.i_; } + + iterator_type i_; +}; + +/** STL-style const iterator for slot_list. + * + * @ingroup signal + */ +template +struct slot_const_iterator +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_slot slot_type; + + typedef T_slot value_type; + typedef const T_slot* pointer; + typedef const T_slot& reference; + + typedef typename internal::signal_impl::const_iterator_type iterator_type; + + slot_const_iterator() + {} + + explicit slot_const_iterator(const iterator_type& i) + : i_(i) {} + + reference operator*() const + { return static_cast(*i_); } + + pointer operator->() const + { return &(operator*()); } + + slot_const_iterator& operator++() + { + ++i_; + return *this; + } + + slot_const_iterator operator++(int) + { + slot_const_iterator __tmp(*this); + ++i_; + return __tmp; + } + + slot_const_iterator& operator--() + { + --i_; + return *this; + } + + slot_const_iterator operator--(int) + { + slot_const_iterator __tmp(*this); + --i_; + return __tmp; + } + + bool operator == (const slot_const_iterator& other) const + { return i_ == other.i_; } + + bool operator != (const slot_const_iterator& other) const + { return i_ != other.i_; } + + iterator_type i_; +}; + +/** STL-style list interface for sigc::signal#. + * slot_list can be used to iterate over the list of slots that + * is managed by a signal. Slots can be added or removed from + * the list while existing iterators stay valid. A slot_list + * object can be retrieved from the signal's slots() function. + * + * @ingroup signal + */ +template +struct slot_list +{ + typedef T_slot slot_type; + + typedef slot_type& reference; + typedef const slot_type& const_reference; + + typedef slot_iterator iterator; + typedef slot_const_iterator const_iterator; + + #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + #else + typedef std::reverse_iterator reverse_iterator; + + typedef std::reverse_iterator const_reverse_iterator; + #endif /* SIGC_HAVE_SUN_REVERSE_ITERATOR */ + + + + + slot_list() + : list_(0) {} + + explicit slot_list(internal::signal_impl* __list) + : list_(__list) {} + + iterator begin() + { return iterator(list_->slots_.begin()); } + + const_iterator begin() const + { return const_iterator(list_->slots_.begin()); } + + iterator end() + { return iterator(list_->slots_.end()); } + + const_iterator end() const + { return const_iterator(list_->slots_.end()); } + + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + reference front() + { return *begin(); } + + const_reference front() const + { return *begin(); } + + reference back() + { return *(--end()); } + + const_reference back() const + { return *(--end()); } + + iterator insert(iterator i, const slot_type& slot_) + { return iterator(list_->insert(i.i_, static_cast(slot_))); } + + void push_front(const slot_type& c) + { insert(begin(), c); } + + void push_back(const slot_type& c) + { insert(end(), c); } + + iterator erase(iterator i) + { return iterator(list_->erase(i.i_)); } + + iterator erase(iterator first_, iterator last_) + { + while (first_ != last_) + first_ = erase(first_); + return last_; + } + + void pop_front() + { erase(begin()); } + + void pop_back() + { + iterator tmp_ = end(); + erase(--tmp_); + } + +protected: + internal::signal_impl* list_; +}; + + +namespace internal { + +/** Special iterator over sigc::internal::signal_impl's slot list that holds extra data. + * This iterators is for use in accumulators. operator*() executes + * the slot. The return value is buffered, so that in an expression + * like @code a = (*i) * (*i); @endcode the slot is executed only once. + */ +template +struct slot_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + //These are needed just to make this a proper C++ iterator, + //that can be used with standard C++ algorithms. + typedef T_result value_type; + typedef T_result& reference; + typedef T_result* pointer; + + typedef T_emitter emitter_type; + typedef T_result result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_iterator_buf() + : c_(0), invoked_(false) {} + + slot_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + result_type operator*() const + { + if (!i_->empty() && !i_->blocked() && !invoked_) + { + r_ = (*c_)(static_cast(*i_)); + invoked_ = true; + } + return r_; + } + + slot_iterator_buf& operator++() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator++(int) + { + slot_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + slot_iterator_buf& operator--() + { + --i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator--(int) + { + slot_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_iterator_buf& other) const + { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty. + * Unfortunately, empty stl iterators are not equal. + * We are forcing equality so that 'first==last' + * in the accumulator's emit function yields true. */ + + bool operator != (const slot_iterator_buf& other) const + { return (c_ && (i_ != other.i_)); } + +private: + iterator_type i_; + const emitter_type* c_; + mutable result_type r_; + mutable bool invoked_; +}; + +/** Template specialization of slot_iterator_buf for void return signals. + */ +template +struct slot_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_emitter emitter_type; + typedef void result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_iterator_buf() + : c_(0), invoked_(false) {} + + slot_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + void operator*() const + { + if (!i_->empty() && !i_->blocked() && !invoked_) + { + (*c_)(static_cast(*i_)); + invoked_ = true; + } + } + + slot_iterator_buf& operator++() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator++(int) + { + slot_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + slot_iterator_buf& operator--() + { + --i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator--(int) + { + slot_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_iterator_buf& other) const + { return i_ == other.i_; } + + bool operator != (const slot_iterator_buf& other) const + { return i_ != other.i_; } + +private: + iterator_type i_; + const emitter_type* c_; + mutable bool invoked_; +}; + +/** Reverse version of sigc::internal::slot_iterator_buf. */ +template +struct slot_reverse_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + //These are needed just to make this a proper C++ iterator, + //that can be used with standard C++ algorithms. + typedef T_result value_type; + typedef T_result& reference; + typedef T_result* pointer; + + typedef T_emitter emitter_type; + typedef T_result result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_reverse_iterator_buf() + : c_(0), invoked_(false) {} + + slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + result_type operator*() const + { + iterator_type __tmp(i_); + --__tmp; + if (!__tmp->empty() && !__tmp->blocked() && !invoked_) + { + r_ = (*c_)(static_cast(*__tmp)); + invoked_ = true; + } + return r_; + } + + slot_reverse_iterator_buf& operator++() + { + --i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator++(int) + { + slot_reverse_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + slot_reverse_iterator_buf& operator--() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator--(int) + { + slot_reverse_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_reverse_iterator_buf& other) const + { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty. + * Unfortunately, empty stl iterators are not equal. + * We are forcing equality so that 'first==last' + * in the accumulator's emit function yields true. */ + + bool operator != (const slot_reverse_iterator_buf& other) const + { return (c_ && (i_ != other.i_)); } + +private: + iterator_type i_; + const emitter_type* c_; + mutable result_type r_; + mutable bool invoked_; +}; + +/** Template specialization of slot_reverse_iterator_buf for void return signals. + */ +template +struct slot_reverse_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_emitter emitter_type; + typedef void result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_reverse_iterator_buf() + : c_(0), invoked_(false) {} + + slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + void operator*() const + { + iterator_type __tmp(i_); + --__tmp; + if (!__tmp->empty() && !__tmp->blocked() && !invoked_) + { + (*c_)(static_cast(*__tmp)); + invoked_ = true; + } + } + + slot_reverse_iterator_buf& operator++() + { + --i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator++(int) + { + slot_reverse_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + slot_reverse_iterator_buf& operator--() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator--(int) + { + slot_reverse_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_reverse_iterator_buf& other) const + { return i_ == other.i_; } + + bool operator != (const slot_reverse_iterator_buf& other) const + { return i_ != other.i_; } + +private: + iterator_type i_; + const emitter_type* c_; + mutable bool invoked_; +}; + +FOR(0,CALL_SIZE,[[SIGNAL_EMIT_N(%1)]]) +} /* namespace internal */ + +FOR(0,CALL_SIZE,[[SIGNAL_N(%1)]]) + +SIGNAL(CALL_SIZE,CALL_SIZE) +FOR(0,eval(CALL_SIZE-1),[[SIGNAL(%1)]]) + +} /* namespace sigc */ + +#endif /* _SIGC_SIGNAL_H_ */ diff --git a/libs/sigc++2/sigc++/macros/slot.h.m4 b/libs/sigc++2/sigc++/macros/slot.h.m4 new file mode 100644 index 0000000000..04c7ad7666 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/slot.h.m4 @@ -0,0 +1,25 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +divert(-1) + +include(template.macros.m4) + +divert(0) + +__FIREWALL__ + +#include diff --git a/libs/sigc++2/sigc++/macros/template.macros.m4 b/libs/sigc++2/sigc++/macros/template.macros.m4 new file mode 100644 index 0000000000..72ee30ccc8 --- /dev/null +++ b/libs/sigc++2/sigc++/macros/template.macros.m4 @@ -0,0 +1,84 @@ +dnl Copyright 2002, The libsigc++ Development Team +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +define(__t_div__,divnum)divert(-1) +dnl +dnl M4 macros for building large files quickly +dnl +divert(0)// -*- c++ -*- +/* Do not edit! -- generated file */ +divert(-1) +changequote([, ]) +changecom() + +dnl +dnl Macros for sigc specifically. +dnl + +define([CALL_SIZE],7) + +#Generate header guards: +define([__FIREWALL__],[dnl +define(__hfile_temp__,[translit(__file__,/., _)])dnl +define(__hfile_temp2__,[translit(__hfile_temp__,+., _)])dnl +define(__hfile__,[_SIGC_[]patsubst(translit(__hfile_temp2__,a-z.,A-Z_), _M4$)_])dnl +#ifndef __hfile__ +#define __hfile__[]dnl +divert(1)dnl +#endif /* __hfile__ */ +divert(0)dnl +]) + +define([_R_],[typename type_trait<$1>::take]) +define([_P_],[typename type_trait<$1>::pass]) + + +dnl +dnl General macros +dnl + +define([UPPER],[translit([$*],[abcdefghijklmnopqrstuvwxyz],[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) +define([LOWER],[translit([$*],[ABCDEFGHIJKLMNOPQRSTUVWXYZ],[abcdefghijklmnopqrstuvwxyz])]) +define([PROT],[[$*]]) + +define([_LOOP], +[ifelse(eval($1<$2),0, +[indir([_LOOP_FORMAT], $1)], +[indir([_LOOP_FORMAT], $1)[]_LOOP_SEP[]_LOOP(eval($1+1), $2)])]) + +define([LOOP], +[pushdef([_LOOP_FORMAT], translit([$1],%, $))dnl +pushdef([_LOOP_SEP],ifelse([$3],[],[[, ]],[$3]))dnl +ifelse(eval($2>0),1,[PROT(_LOOP(1, $2))],[PROT()])dnl +popdef([_LOOP_SEP])dnl +popdef([_LOOP_FORMAT])dnl +]) + +define([NUM],[eval(ifelse([$1],,0,1)ifelse($#,0,0, $#,1,,[+NUM(shift($@))]))]) +define([LIST],[ifelse($#,0,, $#,1,[$1],[$1],,[LIST(shift($@))],[__LIST($@)])]) +define([__LIST],[ifelse($#,0,, $#,1,[$1],[$1[]ifelse([$2],,,[[, ]])__LIST(shift($@))])]) +dnl +define([_NL_],[ +]) + +define([FOR], +[pushdef([_FOR_FUNC],PROT(translit([$3],%, $)))dnl +_FOR($1, $2)[]dnl +popdef([_FOR_FUNC])dnl +]) +define([_FOR],[ifelse(eval($1>$2),1,[],[_FOR_FUNC($1)[]_FOR(eval($1+1), $2)])]) + +divert(__t_div__)dnl diff --git a/libs/sigc++2/sigc++/method_slot.h b/libs/sigc++2/sigc++/method_slot.h new file mode 100644 index 0000000000..2962bb5a74 --- /dev/null +++ b/libs/sigc++2/sigc++/method_slot.h @@ -0,0 +1,7 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + +#ifndef _SIGC_MACROS_METHOD_SLOTHM4_ +#define _SIGC_MACROS_METHOD_SLOTHM4_ +#endif /* _SIGC_MACROS_METHOD_SLOTHM4_ */ diff --git a/libs/sigc++2/sigc++/object.h b/libs/sigc++2/sigc++/object.h new file mode 100644 index 0000000000..0d2120855b --- /dev/null +++ b/libs/sigc++2/sigc++/object.h @@ -0,0 +1,24 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_OBJECT_HPP_ +#define _SIGC_OBJECT_HPP_ + +#include + +#endif /* _SIGC_OBJECT_HPP_ */ diff --git a/libs/sigc++2/sigc++/object_slot.h b/libs/sigc++2/sigc++/object_slot.h new file mode 100644 index 0000000000..65a9fa4e3d --- /dev/null +++ b/libs/sigc++2/sigc++/object_slot.h @@ -0,0 +1,4 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + diff --git a/libs/sigc++2/sigc++/reference_wrapper.h b/libs/sigc++2/sigc++/reference_wrapper.h new file mode 100644 index 0000000000..5a57e91679 --- /dev/null +++ b/libs/sigc++2/sigc++/reference_wrapper.h @@ -0,0 +1,110 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_REFERENCE_WRAPPER_H_ +#define _SIGC_REFERENCE_WRAPPER_H_ + +namespace sigc { + +/** Reference wrapper. + * Use sigc::ref() to create a reference wrapper. + */ +template +struct reference_wrapper +{ + explicit reference_wrapper(T_type& v) + : value_(v) {} + + operator T_type& () const + { return value_; } + + T_type& value_; +}; + +/** Const reference wrapper. + * Use sigc::ref() to create a const reference wrapper. + */ +template +struct const_reference_wrapper +{ + explicit const_reference_wrapper(const T_type& v) + : value_(v) {} + + operator const T_type& () const + { return value_; } + + const T_type& value_; +}; + +/** Creates a reference wrapper. + * Passing an object throught sigc::ref() makes libsigc++ adaptors + * like, e.g., sigc::bind store references to the object instead of copies. + * If the object type inherits from sigc::trackable this will ensure + * automatic invalidation of the adaptors when the object is deleted + * or overwritten. + * + * @param v Reference to store. + * @return A reference wrapper. + */ +template +reference_wrapper ref(T_type& v) +{ return reference_wrapper(v); } + +/** Creates a const reference wrapper. + * Passing an object throught sigc::ref() makes libsigc++ adaptors + * like, e.g., sigc::bind store references to the object instead of copies. + * If the object type inherits from sigc::trackable this will ensure + * automatic invalidation of the adaptors when the object is deleted + * or overwritten. + * + * @param v Reference to store. + * @return A reference wrapper. + */ +template +const_reference_wrapper ref(const T_type& v) +{ return const_reference_wrapper(v); } + +template +struct unwrap_reference +{ + typedef T_type type; +}; + +template +struct unwrap_reference > +{ + typedef T_type& type; +}; + +template +struct unwrap_reference > +{ + typedef const T_type& type; +}; + +template +T_type& unwrap(const reference_wrapper& v) +{ return v; } + +template +const T_type& unwrap(const const_reference_wrapper& v) +{ return v; } + +} /* namespace sigc */ + +#endif /* _SIGC_REFERENCE_WRAPPER_H_ */ diff --git a/libs/sigc++2/sigc++/retype.h b/libs/sigc++2/sigc++/retype.h new file mode 100644 index 0000000000..6db073786e --- /dev/null +++ b/libs/sigc++2/sigc++/retype.h @@ -0,0 +1,8 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ +#ifndef _SIGC_MACROS_RETYPEHM4_ +#define _SIGC_MACROS_RETYPEHM4_ +#include +#include + +#endif /* _SIGC_MACROS_RETYPEHM4_ */ diff --git a/libs/sigc++2/sigc++/retype_return.h b/libs/sigc++2/sigc++/retype_return.h new file mode 100644 index 0000000000..c1d08d7eda --- /dev/null +++ b/libs/sigc++2/sigc++/retype_return.h @@ -0,0 +1,25 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_RETYPE_RETURN_HPP_ +#define _SIGC_RETYPE_RETURN_HPP_ + +#include + + +#endif /* _SIGC_RETYPE_RETURN_HPP_ */ diff --git a/libs/sigc++2/sigc++/sigc++.h b/libs/sigc++2/sigc++/sigc++.h new file mode 100644 index 0000000000..90a9e6dd17 --- /dev/null +++ b/libs/sigc++2/sigc++/sigc++.h @@ -0,0 +1,30 @@ +/* + * Copyright 2003, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef SIGCXX_SIGCXX_H +#define SIGCXX_SIGCXX_H + +#include +#include +#include +#include +#include + +#endif /* SIGCXX_SIGCXX_H */ + diff --git a/libs/sigc++2/sigc++/signal.cc b/libs/sigc++2/sigc++/signal.cc new file mode 100644 index 0000000000..993eee4aca --- /dev/null +++ b/libs/sigc++2/sigc++/signal.cc @@ -0,0 +1,25 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include + +namespace sigc { + + +} /* sigc */ diff --git a/libs/sigc++2/sigc++/signal.h b/libs/sigc++2/sigc++/signal.h new file mode 100644 index 0000000000..f88b9c0b64 --- /dev/null +++ b/libs/sigc++2/sigc++/signal.h @@ -0,0 +1,3823 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + +#ifndef _SIGC_SIGNAL_H_ +#define _SIGC_SIGNAL_H_ + +#include +#include +#include +#include +#include +#include + +//SIGC_TYPEDEF_REDEFINE_ALLOWED: +// TODO: This should have its own test, but I can not create one that gives the error instead of just a warning. murrayc. +// I have just used this because there is a correlation between these two problems. +#ifdef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + //Compilers, such as older versions of SUN Forte C++, that do not allow this also often + //do not allow a typedef to have the same name as a class in the typedef's definition. + //For Sun Forte CC 5.7 (SUN Workshop 10), comment this out to fix the build. + #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 +#endif + +namespace sigc { + +/** STL-style iterator for slot_list. + * + * @ingroup signal + */ +template +struct slot_iterator +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_slot slot_type; + + typedef T_slot value_type; + typedef T_slot* pointer; + typedef T_slot& reference; + + typedef typename internal::signal_impl::iterator_type iterator_type; + + slot_iterator() + {} + + explicit slot_iterator(const iterator_type& i) + : i_(i) {} + + reference operator*() const + { return static_cast(*i_); } + + pointer operator->() const + { return &(operator*()); } + + slot_iterator& operator++() + { + ++i_; + return *this; + } + + slot_iterator operator++(int) + { + slot_iterator __tmp(*this); + ++i_; + return __tmp; + } + + slot_iterator& operator--() + { + --i_; + return *this; + } + + slot_iterator operator--(int) + { + slot_iterator __tmp(*this); + --i_; + return __tmp; + } + + bool operator == (const slot_iterator& other) const + { return i_ == other.i_; } + + bool operator != (const slot_iterator& other) const + { return i_ != other.i_; } + + iterator_type i_; +}; + +/** STL-style const iterator for slot_list. + * + * @ingroup signal + */ +template +struct slot_const_iterator +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_slot slot_type; + + typedef T_slot value_type; + typedef const T_slot* pointer; + typedef const T_slot& reference; + + typedef typename internal::signal_impl::const_iterator_type iterator_type; + + slot_const_iterator() + {} + + explicit slot_const_iterator(const iterator_type& i) + : i_(i) {} + + reference operator*() const + { return static_cast(*i_); } + + pointer operator->() const + { return &(operator*()); } + + slot_const_iterator& operator++() + { + ++i_; + return *this; + } + + slot_const_iterator operator++(int) + { + slot_const_iterator __tmp(*this); + ++i_; + return __tmp; + } + + slot_const_iterator& operator--() + { + --i_; + return *this; + } + + slot_const_iterator operator--(int) + { + slot_const_iterator __tmp(*this); + --i_; + return __tmp; + } + + bool operator == (const slot_const_iterator& other) const + { return i_ == other.i_; } + + bool operator != (const slot_const_iterator& other) const + { return i_ != other.i_; } + + iterator_type i_; +}; + +/** STL-style list interface for sigc::signal#. + * slot_list can be used to iterate over the list of slots that + * is managed by a signal. Slots can be added or removed from + * the list while existing iterators stay valid. A slot_list + * object can be retrieved from the signal's slots() function. + * + * @ingroup signal + */ +template +struct slot_list +{ + typedef T_slot slot_type; + + typedef slot_type& reference; + typedef const slot_type& const_reference; + + typedef slot_iterator iterator; + typedef slot_const_iterator const_iterator; + + #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + #else + typedef std::reverse_iterator reverse_iterator; + + typedef std::reverse_iterator const_reverse_iterator; + #endif /* SIGC_HAVE_SUN_REVERSE_ITERATOR */ + + + + + slot_list() + : list_(0) {} + + explicit slot_list(internal::signal_impl* __list) + : list_(__list) {} + + iterator begin() + { return iterator(list_->slots_.begin()); } + + const_iterator begin() const + { return const_iterator(list_->slots_.begin()); } + + iterator end() + { return iterator(list_->slots_.end()); } + + const_iterator end() const + { return const_iterator(list_->slots_.end()); } + + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + reference front() + { return *begin(); } + + const_reference front() const + { return *begin(); } + + reference back() + { return *(--end()); } + + const_reference back() const + { return *(--end()); } + + iterator insert(iterator i, const slot_type& slot_) + { return iterator(list_->insert(i.i_, static_cast(slot_))); } + + void push_front(const slot_type& c) + { insert(begin(), c); } + + void push_back(const slot_type& c) + { insert(end(), c); } + + iterator erase(iterator i) + { return iterator(list_->erase(i.i_)); } + + iterator erase(iterator first_, iterator last_) + { + while (first_ != last_) + first_ = erase(first_); + return last_; + } + + void pop_front() + { erase(begin()); } + + void pop_back() + { + iterator tmp_ = end(); + erase(--tmp_); + } + +protected: + internal::signal_impl* list_; +}; + + +namespace internal { + +/** Special iterator over sigc::internal::signal_impl's slot list that holds extra data. + * This iterators is for use in accumulators. operator*() executes + * the slot. The return value is buffered, so that in an expression + * like @code a = (*i) * (*i); @endcode the slot is executed only once. + */ +template +struct slot_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + //These are needed just to make this a proper C++ iterator, + //that can be used with standard C++ algorithms. + typedef T_result value_type; + typedef T_result& reference; + typedef T_result* pointer; + + typedef T_emitter emitter_type; + typedef T_result result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_iterator_buf() + : c_(0), invoked_(false) {} + + slot_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + result_type operator*() const + { + if (!i_->empty() && !i_->blocked() && !invoked_) + { + r_ = (*c_)(static_cast(*i_)); + invoked_ = true; + } + return r_; + } + + slot_iterator_buf& operator++() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator++(int) + { + slot_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + slot_iterator_buf& operator--() + { + --i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator--(int) + { + slot_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_iterator_buf& other) const + { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty. + * Unfortunately, empty stl iterators are not equal. + * We are forcing equality so that 'first==last' + * in the accumulator's emit function yields true. */ + + bool operator != (const slot_iterator_buf& other) const + { return (c_ && (i_ != other.i_)); } + +private: + iterator_type i_; + const emitter_type* c_; + mutable result_type r_; + mutable bool invoked_; +}; + +/** Template specialization of slot_iterator_buf for void return signals. + */ +template +struct slot_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_emitter emitter_type; + typedef void result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_iterator_buf() + : c_(0), invoked_(false) {} + + slot_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + void operator*() const + { + if (!i_->empty() && !i_->blocked() && !invoked_) + { + (*c_)(static_cast(*i_)); + invoked_ = true; + } + } + + slot_iterator_buf& operator++() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator++(int) + { + slot_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + slot_iterator_buf& operator--() + { + --i_; + invoked_ = false; + return *this; + } + + slot_iterator_buf operator--(int) + { + slot_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_iterator_buf& other) const + { return i_ == other.i_; } + + bool operator != (const slot_iterator_buf& other) const + { return i_ != other.i_; } + +private: + iterator_type i_; + const emitter_type* c_; + mutable bool invoked_; +}; + +/** Reverse version of sigc::internal::slot_iterator_buf. */ +template +struct slot_reverse_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + //These are needed just to make this a proper C++ iterator, + //that can be used with standard C++ algorithms. + typedef T_result value_type; + typedef T_result& reference; + typedef T_result* pointer; + + typedef T_emitter emitter_type; + typedef T_result result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_reverse_iterator_buf() + : c_(0), invoked_(false) {} + + slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + result_type operator*() const + { + iterator_type __tmp(i_); + --__tmp; + if (!__tmp->empty() && !__tmp->blocked() && !invoked_) + { + r_ = (*c_)(static_cast(*__tmp)); + invoked_ = true; + } + return r_; + } + + slot_reverse_iterator_buf& operator++() + { + --i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator++(int) + { + slot_reverse_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + slot_reverse_iterator_buf& operator--() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator--(int) + { + slot_reverse_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_reverse_iterator_buf& other) const + { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty. + * Unfortunately, empty stl iterators are not equal. + * We are forcing equality so that 'first==last' + * in the accumulator's emit function yields true. */ + + bool operator != (const slot_reverse_iterator_buf& other) const + { return (c_ && (i_ != other.i_)); } + +private: + iterator_type i_; + const emitter_type* c_; + mutable result_type r_; + mutable bool invoked_; +}; + +/** Template specialization of slot_reverse_iterator_buf for void return signals. + */ +template +struct slot_reverse_iterator_buf +{ + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef T_emitter emitter_type; + typedef void result_type; + typedef typename T_emitter::slot_type slot_type; + + typedef signal_impl::const_iterator_type iterator_type; + + slot_reverse_iterator_buf() + : c_(0), invoked_(false) {} + + slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c) + : i_(i), c_(c), invoked_(false) {} + + void operator*() const + { + iterator_type __tmp(i_); + --__tmp; + if (!__tmp->empty() && !__tmp->blocked() && !invoked_) + { + (*c_)(static_cast(*__tmp)); + invoked_ = true; + } + } + + slot_reverse_iterator_buf& operator++() + { + --i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator++(int) + { + slot_reverse_iterator_buf __tmp(*this); + --i_; + invoked_ = false; + return __tmp; + } + + slot_reverse_iterator_buf& operator--() + { + ++i_; + invoked_ = false; + return *this; + } + + slot_reverse_iterator_buf operator--(int) + { + slot_reverse_iterator_buf __tmp(*this); + ++i_; + invoked_ = false; + return __tmp; + } + + bool operator == (const slot_reverse_iterator_buf& other) const + { return i_ == other.i_; } + + bool operator != (const slot_reverse_iterator_buf& other) const + { return i_ != other.i_; } + +private: + iterator_type i_; + const emitter_type* c_; + mutable bool invoked_; +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal0. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit0 +{ + typedef signal_emit0 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + signal_emit0() {} + + /** Invokes a slot. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self ; + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self ; + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit0 +{ + typedef signal_emit0 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template <> +struct signal_emit0 +{ + typedef signal_emit0 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef void (*call_type)(slot_rep*); + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + */ + static result_type emit(signal_impl* impl) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + */ + static result_type emit_reverse(signal_impl* impl) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal1. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit1 +{ + typedef signal_emit1 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit1(typename type_trait::take _A_a1) + : _A_a1_(_A_a1) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit1. + + * @param _A_a1 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit1. + + * @param _A_a1 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit1 +{ + typedef signal_emit1 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit1 +{ + typedef signal_emit1 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal2. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit2 +{ + typedef signal_emit2 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit2(typename type_trait::take _A_a1,typename type_trait::take _A_a2) + : _A_a1_(_A_a1),_A_a2_(_A_a2) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit2. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit2. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit2 +{ + typedef signal_emit2 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit2 +{ + typedef signal_emit2 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal3. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit3 +{ + typedef signal_emit3 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit3(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit3. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit3. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; + typename type_trait::take _A_a3_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit3 +{ + typedef signal_emit3 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit3 +{ + typedef signal_emit3 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal4. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit4 +{ + typedef signal_emit4 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit4(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit4. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit4. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; + typename type_trait::take _A_a3_; + typename type_trait::take _A_a4_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit4 +{ + typedef signal_emit4 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit4 +{ + typedef signal_emit4 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal5. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit5 +{ + typedef signal_emit5 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit5(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit5. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit5. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; + typename type_trait::take _A_a3_; + typename type_trait::take _A_a4_; + typename type_trait::take _A_a5_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit5 +{ + typedef signal_emit5 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit5 +{ + typedef signal_emit5 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal6. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit6 +{ + typedef signal_emit6 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit6(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5),_A_a6_(_A_a6) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_,_A_a6_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit6. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit6. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; + typename type_trait::take _A_a3_; + typename type_trait::take _A_a4_; + typename type_trait::take _A_a5_; + typename type_trait::take _A_a6_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit6 +{ + typedef signal_emit6 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit6 +{ + typedef signal_emit6 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); + } + } +}; + +/** Abstracts signal emission. + * This template implements the emit() function of signal7. + * Template specializations are available to optimize signal + * emission when no accumulator is used, i.e. the template + * argument @e T_accumulator is @p nil. + */ +template +struct signal_emit7 +{ + typedef signal_emit7 self_type; + typedef typename T_accumulator::result_type result_type; + typedef slot slot_type; + typedef internal::slot_iterator_buf slot_iterator_buf_type; + typedef internal::slot_reverse_iterator_buf slot_reverse_iterator_buf_type; + typedef signal_impl::const_iterator_type iterator_type; + + /** Instantiates the class. + * The parameters are stored in member variables. operator()() passes + * the values on to some slot. + */ + signal_emit7(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5),_A_a6_(_A_a6),_A_a7_(_A_a7) {} + + + /** Invokes a slot using the buffered parameter values. + * @param _A_slot Some slot to invoke. + * @return The slot's return value. + */ + T_return operator()(const slot_type& _A_slot) const + { return (reinterpret_cast(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_,_A_a6_,_A_a7_); } + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are buffered in a temporary instance of signal_emit7. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + return accumulator(slot_iterator_buf_type(slots.begin(), &self), + slot_iterator_buf_type(slots.end(), &self)); + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are buffered in a temporary instance of signal_emit7. + + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations as processed by the accumulator. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + T_accumulator accumulator; + + if (!impl) + return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type()); + + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self), + slot_reverse_iterator_buf_type(slots.begin(), &self)); + } + + typename type_trait::take _A_a1_; + typename type_trait::take _A_a2_; + typename type_trait::take _A_a3_; + typename type_trait::take _A_a4_; + typename type_trait::take _A_a5_; + typename type_trait::take _A_a6_; + typename type_trait::take _A_a7_; +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used. + */ +template +struct signal_emit7 +{ + typedef signal_emit7 self_type; + typedef T_return result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { + temp_slot_list slots(impl->slots_); + iterator_type it = slots.begin(); + for (; it != slots.end(); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == slots.end()) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + for (++it; it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + } + + return r_; + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * The return value of the last slot invoked is returned. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + * @return The return value of the last slot invoked. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + if (!impl || impl->slots_.empty()) + return T_return(); + + signal_exec exec(impl); + T_return r_ = T_return(); + + //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed. + //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249 + { +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + + temp_slot_list slots(impl->slots_); + reverse_iterator_type it(slots.end()); + for (; it != reverse_iterator_type(slots.begin()); ++it) + if (!it->empty() && !it->blocked()) break; + + if (it == reverse_iterator_type(slots.begin())) + return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows: + + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + for (++it; it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + r_ = (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + } + + return r_; + } +}; + +/** Abstracts signal emission. + * This template specialization implements an optimized emit() + * function for the case that no accumulator is used and the + * return type is @p void. + */ +template +struct signal_emit7 +{ + typedef signal_emit7 self_type; + typedef void result_type; + typedef slot slot_type; + typedef signal_impl::const_iterator_type iterator_type; + typedef typename slot_type::call_type call_type; + + /** Executes a list of slots using an accumulator of type @e T_accumulator. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + */ + static result_type emit(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + + for (iterator_type it = slots.begin(); it != slots.end(); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + } + + /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order. + * The arguments are passed directly on to the slots. + * @param first An iterator pointing to the first slot in the list. + * @param last An iterator pointing to the last slot in the list. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + */ + static result_type emit_reverse(signal_impl* impl, typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) + { + if (!impl || impl->slots_.empty()) return; + signal_exec exec(impl); + temp_slot_list slots(impl->slots_); + +#ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR + typedef std::reverse_iterator reverse_iterator_type; +#else + typedef std::reverse_iterator reverse_iterator_type; +#endif + for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it) + { + if (it->empty() || it->blocked()) + continue; + (reinterpret_cast(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); + } + } +}; + + +} /* namespace internal */ + +/** Signal declaration. + * signal0 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal0 + : public signal_base +{ +public: + typedef internal::signal_emit0 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @return The accumulated return values of the slot invocations. + */ + result_type emit() const + { return emitter_type::emit(impl_); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse() const + { return emitter_type::emit_reverse(impl_); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()() const + { return emit(); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal0::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor0 make_slot() const + { return bound_const_mem_functor0(this, &signal0::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal0() {} + + signal0(const signal0& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal1 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal1 + : public signal_base +{ +public: + typedef internal::signal_emit1 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1) const + { return emitter_type::emit(impl_, _A_a1); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1) const + { return emitter_type::emit_reverse(impl_, _A_a1); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1) const + { return emit(_A_a1); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal1::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor1::take> make_slot() const + { return bound_const_mem_functor1::take>(this, &signal1::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal1() {} + + signal1(const signal1& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal2 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal2 + : public signal_base +{ +public: + typedef internal::signal_emit2 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return emitter_type::emit(impl_, _A_a1,_A_a2); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2) const + { return emit(_A_a1,_A_a2); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal2::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor2::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor2::take,typename type_trait::take>(this, &signal2::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal2() {} + + signal2(const signal2& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal3 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_arg3 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal3 + : public signal_base +{ +public: + typedef internal::signal_emit3 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2,_A_a3); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3) const + { return emit(_A_a1,_A_a2,_A_a3); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal3::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor3::take,typename type_trait::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor3::take,typename type_trait::take,typename type_trait::take>(this, &signal3::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal3() {} + + signal3(const signal3& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal4 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_arg3 Argument type used in the definition of emit(). + * - @e T_arg4 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal4 + : public signal_base +{ +public: + typedef internal::signal_emit4 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2,_A_a3,_A_a4); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4) const + { return emit(_A_a1,_A_a2,_A_a3,_A_a4); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal4::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor4::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor4::take,typename type_trait::take,typename type_trait::take,typename type_trait::take>(this, &signal4::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal4() {} + + signal4(const signal4& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal5 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_arg3 Argument type used in the definition of emit(). + * - @e T_arg4 Argument type used in the definition of emit(). + * - @e T_arg5 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal5 + : public signal_base +{ +public: + typedef internal::signal_emit5 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5) const + { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal5::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor5::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor5::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take>(this, &signal5::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal5() {} + + signal5(const signal5& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal6 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_arg3 Argument type used in the definition of emit(). + * - @e T_arg4 Argument type used in the definition of emit(). + * - @e T_arg5 Argument type used in the definition of emit(). + * - @e T_arg6 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal6 + : public signal_base +{ +public: + typedef internal::signal_emit6 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6) const + { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal6::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor6::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor6::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take>(this, &signal6::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal6() {} + + signal6(const signal6& src) + : signal_base(src) {} +}; + +/** Signal declaration. + * signal7 can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitely. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The following template arguments are used: + * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator). + * - @e T_arg1 Argument type used in the definition of emit(). + * - @e T_arg2 Argument type used in the definition of emit(). + * - @e T_arg3 Argument type used in the definition of emit(). + * - @e T_arg4 Argument type used in the definition of emit(). + * - @e T_arg5 Argument type used in the definition of emit(). + * - @e T_arg6 Argument type used in the definition of emit(). + * - @e T_arg7 Argument type used in the definition of emit(). + * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked. + * + * You should use the more convenient unnumbered sigc::signal template. + * + * @ingroup signal + */ +template +class signal7 + : public signal_base +{ +public: + typedef internal::signal_emit7 emitter_type; + typedef typename emitter_type::result_type result_type; + typedef slot slot_type; + typedef slot_list slot_list_type; + typedef typename slot_list_type::iterator iterator; + typedef typename slot_list_type::const_iterator const_iterator; + typedef typename slot_list_type::reverse_iterator reverse_iterator; + typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator; + + /** Add a slot to the list of slots. + * Any functor or slot may be passed into connect(). + * It will be converted into a slot implicitely. + * The returned iterator may be stored for disconnection + * of the slot at some later point. It stays valid until + * the slot is removed from the list of slots. The iterator + * can also be implicitely converted into a sigc::connection object + * that may be used safely beyond the life time of the slot. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator connect(const slot_type& slot_) + { return iterator(signal_base::connect(static_cast(slot_))); } + + /** Triggers the emission of the signal. + * During signal emission all slots that have been connected + * to the signal are invoked unless they are manually set into + * a blocking state. The parameters are passed on to the slots. + * If @e T_accumulated is not @p nil, an accumulator of this type + * is used to process the return values of the slot invocations. + * Otherwise, the return value of the last slot invoked is returned. + * @param _A_a1 Argument to be passed on to the slots. + * @param _A_a2 Argument to be passed on to the slots. + * @param _A_a3 Argument to be passed on to the slots. + * @param _A_a4 Argument to be passed on to the slots. + * @param _A_a5 Argument to be passed on to the slots. + * @param _A_a6 Argument to be passed on to the slots. + * @param _A_a7 Argument to be passed on to the slots. + * @return The accumulated return values of the slot invocations. + */ + result_type emit(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Triggers the emission of the signal in reverse order (see emit()). */ + result_type emit_reverse(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return emitter_type::emit_reverse(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Triggers the emission of the signal (see emit()). */ + result_type operator()(typename type_trait::take _A_a1,typename type_trait::take _A_a2,typename type_trait::take _A_a3,typename type_trait::take _A_a4,typename type_trait::take _A_a5,typename type_trait::take _A_a6,typename type_trait::take _A_a7) const + { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); } + + /** Creates a functor that calls emit() on this signal. + * @code + * sigc::mem_fun(mysignal, &sigc::signal7::emit) + * @endcode + * yields the same result. + * @return A functor that calls emit() on this signal. + */ + bound_const_mem_functor7::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take> make_slot() const + { return bound_const_mem_functor7::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take,typename type_trait::take>(this, &signal7::emit); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + slot_list_type slots() + { return slot_list_type(impl()); } + + /** Creates an STL-style interface for the signal's list of slots. + * This interface supports iteration, insertion and removal of slots. + * @return An STL-style interface for the signal's list of slots. + */ + const slot_list_type slots() const + { return slot_list_type(const_cast(this)->impl()); } + + signal7() {} + + signal7(const signal7& src) + : signal_base(src) {} +}; + + + +/** Convenience wrapper for the numbered sigc::signal# templates. + * signal can be used to connect() slots that are invoked + * during subsequent calls to emit(). Any functor or slot + * can be passed into connect(). It is converted into a slot + * implicitly. + * + * If you want to connect one signal to another, use make_slot() + * to retrieve a functor that emits the signal when invoked. + * + * Be careful if you directly pass one signal into the connect() + * method of another: a shallow copy of the signal is made and + * the signal's slots are not disconnected until both the signal + * and its clone are destroyed which is probably not what you want! + * + * An STL-style list interface for the signal's list of slots + * can be retrieved with slots(). This interface supports + * iteration, insertion and removal of slots. + * + * The template arguments determine the function signature of + * the emit() function: + * - @e T_return The desired return type of the emit() function. + * - @e T_arg1 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg2 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg3 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg4 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg5 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg6 Argument type used in the definition of emit(). The default @p nil means no argument. + * - @e T_arg7 Argument type used in the definition of emit(). The default @p nil means no argument. + * + * To specify an accumulator type the nested class signal::accumulated can be used. + * + * @par Example: + * @code + * void foo(int) {} + * sigc::signal sig; + * sig.connect(sigc::ptr_fun(&foo)); + * sig.emit(19); + * @endcode + * + * @ingroup signal + */ +template +class signal + : public signal7 +{ +public: + /** Convenience wrapper for the numbered sigc::signal# templates. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + * + * An accumulator is a functor that uses a pair of special iterators + * to step through a list of slots and calculate a return value + * from the results of the slot invokations. The iterators' operator*() + * executes the slot. The return value is buffered, so that in an expression + * like @code a = (*i) * (*i); @endcode the slot is executed only once. + * The accumulator must define its return value as @p result_type. + * + * @par Example 1: + * This accumulator calculates the arithmetic mean value: + * @code + * struct arithmetic_mean_accumulator + * { + * typedef double result_type; + * template + * result_type operator()(T_iterator first, T_iterator last) const + * { + * result_type value_ = 0; + * int n_ = 0; + * for (; first != last; ++first, ++n_) + * value_ += *first; + * return value_ / n_; + * } + * }; + * @endcode + * + * @par Example 2: + * This accumulator stops signal emission when a slot returns zero: + * @code + * struct interruptable_accumulator + * { + * typedef bool result_type; + * template + * result_type operator()(T_iterator first, T_iterator last) const + * { + * for (; first != last; ++first, ++n_) + * if (!*first) return false; + * return true; + * } + * }; + * @endcode + * + * @ingroup signal + */ + template + class accumulated + : public signal7 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal7(src) {} + }; + + signal() {} + signal(const signal& src) + : signal7(src) {} +}; + + + +/** Convenience wrapper for the numbered sigc::signal0 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 0 argument(s). + */ +template +class signal + : public signal0 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal0 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal0 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal0(src) {} + }; + + signal() {} + signal(const signal& src) + : signal0(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal1 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 1 argument(s). + */ +template +class signal + : public signal1 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal1 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal1 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal1(src) {} + }; + + signal() {} + signal(const signal& src) + : signal1(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal2 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 2 argument(s). + */ +template +class signal + : public signal2 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal2 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal2 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal2(src) {} + }; + + signal() {} + signal(const signal& src) + : signal2(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal3 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 3 argument(s). + */ +template +class signal + : public signal3 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal3 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal3 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal3(src) {} + }; + + signal() {} + signal(const signal& src) + : signal3(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal4 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 4 argument(s). + */ +template +class signal + : public signal4 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal4 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal4 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal4(src) {} + }; + + signal() {} + signal(const signal& src) + : signal4(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal5 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 5 argument(s). + */ +template +class signal + : public signal5 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal5 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal5 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal5(src) {} + }; + + signal() {} + signal(const signal& src) + : signal5(src) {} +}; + + +/** Convenience wrapper for the numbered sigc::signal6 template. + * See the base class for useful methods. + * This is the template specialization of the unnumbered sigc::signal + * template for 6 argument(s). + */ +template +class signal + : public signal6 +{ +public: + + /** Convenience wrapper for the numbered sigc::signal6 template. + * Like sigc::signal but the additional template parameter @e T_accumulator + * defines the accumulator type that should be used. + */ + template + class accumulated + : public signal6 + { + public: + accumulated() {} + accumulated(const accumulated& src) + : signal6(src) {} + }; + + signal() {} + signal(const signal& src) + : signal6(src) {} +}; + + + +} /* namespace sigc */ + +#endif /* _SIGC_SIGNAL_H_ */ diff --git a/libs/sigc++2/sigc++/signal_base.cc b/libs/sigc++2/sigc++/signal_base.cc new file mode 100644 index 0000000000..e22017f10b --- /dev/null +++ b/libs/sigc++2/sigc++/signal_base.cc @@ -0,0 +1,152 @@ +// -*- c++ -*- +/* + * Copyright 2003, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include + +namespace sigc { +namespace internal { + +signal_impl::signal_impl() +: ref_count_(0), exec_count_(0), deferred_(0) +{} + +// only MSVC needs this to guarantee that all new/delete are executed from the DLL module +#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY +void* signal_impl::operator new(size_t size_) +{ + return malloc(size_); +} + +void signal_impl::operator delete(void* p) +{ + free(p); +} +#endif + +void signal_impl::clear() +{ + slots_.clear(); +} + +signal_impl::size_type signal_impl::size() const +{ + return slots_.size(); +} + +signal_impl::iterator_type signal_impl::connect(const slot_base& slot_) +{ + return insert(slots_.end(), slot_); +} + +signal_impl::iterator_type signal_impl::erase(iterator_type i) +{ + return slots_.erase(i); +} + +signal_impl::iterator_type signal_impl::insert(signal_impl::iterator_type i, const slot_base& slot_) +{ + iterator_type temp = slots_.insert(i, slot_); + temp->set_parent(this, ¬ify); + return temp; +} + +void signal_impl::sweep() +{ + deferred_ = false; + iterator_type i = slots_.begin(); + while (i != slots_.end()) + if ((*i).empty()) + i = slots_.erase(i); + else + ++i; +} + +void* signal_impl::notify(void* d) +{ + signal_impl* self = reinterpret_cast(d); + if (self->exec_count_ == 0) + self->sweep(); + else // This is occuring during signal emission. + self->deferred_ = true; // => sweep() will be called from ~signal_exec(). + return 0; // This is safer because we don't have to care about our iterators in emit(). +} + +} /* namespace internal */ + +signal_base::signal_base() +: impl_(0) +{} + +signal_base::signal_base(const signal_base& src) +: trackable(), + impl_(src.impl()) +{ + impl_->reference(); +} + +signal_base::~signal_base() +{ + if (impl_) + impl_->unreference(); +} + +void signal_base::clear() +{ + if (impl_) + impl_->clear(); +} + +signal_base::size_type signal_base::size() const +{ + return (impl_ ? impl_->size() : 0); +} + +signal_base::iterator_type signal_base::connect(const slot_base& slot_) +{ + return impl()->connect(slot_); +} + +signal_base::iterator_type signal_base::insert(iterator_type i, const slot_base& slot_) +{ + return impl()->insert(i, slot_); +} + +signal_base::iterator_type signal_base::erase(iterator_type i) +{ + return impl()->erase(i); +} + +signal_base& signal_base::operator = (const signal_base& src) +{ + if (impl_) impl_->unreference(); + impl_ = src.impl(); + impl_->reference(); + return *this; +} + +internal::signal_impl* signal_base::impl() const +{ + if (!impl_) { + impl_ = new internal::signal_impl; + impl_->reference(); // start with a reference count of 1 + } + return impl_; +} + +} /* sigc */ diff --git a/libs/sigc++2/sigc++/signal_base.h b/libs/sigc++2/sigc++/signal_base.h new file mode 100644 index 0000000000..582a8f4943 --- /dev/null +++ b/libs/sigc++2/sigc++/signal_base.h @@ -0,0 +1,300 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef _SIGC_SIGNAL_BASE_H_ +#define _SIGC_SIGNAL_BASE_H_ + +#include +#include +#include +#include +#include +#include + +namespace sigc +{ + +namespace internal +{ + +/** Implementation of the signal interface. + * signal_impl manages a list of slots. When a slot becomes + * invalid (because some referred object dies), notify() is executed. + * notify() either calls sweep() directly or defers the execution of + * sweep() when the signal is being emitted. sweep() removes all + * invalid slot from the list. + */ +struct SIGC_API signal_impl +{ + typedef size_t size_type; + typedef std::list slot_list; + typedef slot_list::iterator iterator_type; + typedef slot_list::const_iterator const_iterator_type; + + signal_impl(); + + // only MSVC needs this to guarantee that all new/delete are executed from the DLL module +#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY + void* operator new(size_t size_); + void operator delete(void* p); +#endif + + /// Increments the reference counter. + inline void reference() + { ++ref_count_; } + + /// Increments the reference and execution counter. + inline void reference_exec() + { ++ref_count_; ++exec_count_; } + + /** Decrements the reference counter. + * The object is deleted when the reference counter reaches zero. + */ + inline void unreference() + { if (!(--ref_count_)) delete this; } + + /** Decrements the reference and execution counter. + * Invokes sweep() if the execution counter reaches zero and the + * removal of one or more slots has been deferred. + */ + inline void unreference_exec() + { + if (!(--ref_count_)) delete this; + else if (!(--exec_count_) && deferred_) sweep(); + } + + /** Returns whether the list of slots is empty. + * @return @p true if the list of slots is empty. + */ + inline bool empty() const + { return slots_.empty(); } + + /// Empties the list of slots. + void clear(); + + /** Returns the number of slots in the list. + * @return The number of slots in the list. + */ + size_type size() const; + + /** Adds a slot at the bottom of the list of slots. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator_type connect(const slot_base& slot_); + + /** Adds a slot at the given position into the list of slots. + * @param i An iterator indicating the position where @p slot_ should be inserted. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator_type insert(iterator_type i, const slot_base& slot_); + + /** Removes the slot at the given position from the list of slots. + * @param i An iterator pointing to the slot to be removed. + * @return An iterator pointing to the slot in the list after the one removed. + */ + iterator_type erase(iterator_type i); + + /// Removes invalid slots from the list of slots. + void sweep(); + + /** Callback that is executed when some slot becomes invalid. + * This callback is registered in every slot when inserted into + * the list of slots. It is executed when a slot becomes invalid + * because of some referred object being destroyed. + * It either calls sweep() directly or defers the execution of + * sweep() when the signal is being emitted. + * @param d The signal object (@p this). + */ + static void* notify(void* d); + + /** Reference counter. + * The object is destroyed when @em ref_count_ reaches zero. + */ + short ref_count_; + + /** Execution counter. + * Indicates whether the signal is being emitted. + */ + short exec_count_; + + /// Indicates whether the execution of sweep() is being deferred. + bool deferred_; + + /// The list of slots. + std::list slots_; +}; + +/// Exception safe sweeper for cleaning up invalid slots on the slot list. +struct SIGC_API signal_exec +{ + /// The parent sigc::signal_impl object. + signal_impl* sig_; + + /** Increments the reference and execution counter of the parent sigc::signal_impl object. + * @param sig The parent sigc::signal_impl object. + */ + inline signal_exec(const signal_impl* sig) + : sig_(const_cast(sig) ) + { sig_->reference_exec(); } + + /// Decrements the reference and execution counter of the parent sigc::signal_impl object. + inline ~signal_exec() + { sig_->unreference_exec(); } +}; + +/** Temporary slot list used during signal emission. + * Through evolution this class is slightly misnamed. It is now + * an index into the slot_list passed into it. It simply keeps track + * of where the end of this list was at construction, and pretends that's + * the end of your list. This way you may connect during emittion without + * inadvertently entering an infinite loop, as well as make other + * modifications to the slot_list at your own risk. + */ +struct temp_slot_list +{ + typedef signal_impl::slot_list slot_list; + typedef signal_impl::iterator_type iterator; + typedef signal_impl::const_iterator_type const_iterator; + + temp_slot_list(slot_list &slots) : slots_(slots) + { + placeholder = slots_.insert(slots_.end(), slot_base()); + } + + ~temp_slot_list() + { + slots_.erase(placeholder); + } + + iterator begin() { return slots_.begin(); } + iterator end() { return placeholder; } + const_iterator begin() const { return slots_.begin(); } + const_iterator end() const { return placeholder; } + +private: + slot_list &slots_; + slot_list::iterator placeholder; +}; + +} /* namespace internal */ + + +/** @defgroup signal Signals + * Use sigc::signal::connect() with sigc::mem_fun() and sigc::ptr_fun() to connect a method or function with a signal. + * + * @code + * signal_clicked.connect( sigc::mem_fun(*this, &MyWindow::on_clicked) ); + * @endcode + * + * When the signal is emitted your method will be called. + * + * signal::connect() returns a connection, which you can later use to disconnect your method. + * If the type of your object inherits from sigc::trackable the method is disconnected + * automatically when your object is destroyed. + * + * When signals are copied they share the underlying information, + * so you can have a protected/private sigc::signal member and a public accessor method. + * + * signal and slot objects provide the core functionality of this + * library. A slot is a container for an arbitrary functor. + * A signal is a list of slots that are executed on emission. + * For compile time type safety a list of template arguments + * must be provided for the signal template that determines the + * parameter list for emission. Functors and closures are converted + * into slots implicitely on connection, triggering compiler errors + * if the given functor or closure cannot be invoked with the + * parameter list of the signal to connect to. + */ + +/** Base class for the sigc::signal# templates. + * signal_base integrates most of the interface of the derived sigc::signal# + * templates. The implementation, however, resides in sigc::internal::signal_impl. + * A sigc::internal::signal_impl object is dynamically allocated from signal_base + * when first connecting a slot to the signal. This ensures that empty signals + * don't waste memory. + * + * @ingroup signal + */ +struct SIGC_API signal_base : public trackable +{ + typedef size_t size_type; + + signal_base(); + + signal_base(const signal_base& src); + + ~signal_base(); + + signal_base& operator = (const signal_base& src); + + /** Returns whether the list of slots is empty. + * @return @p true if the list of slots is empty. + */ + inline bool empty() const + { return (!impl_ || impl_->empty()); } + + /// Empties the list of slots. + void clear(); + + /** Returns the number of slots in the list. + * @return The number of slots in the list. + */ + size_type size() const; + +protected: + typedef internal::signal_impl::iterator_type iterator_type; + + /** Adds a slot at the end of the list of slots. + * With connect(), slots can also be added during signal emission. + * In this case, they won't be executed until the next emission occurs. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator_type connect(const slot_base& slot_); + + /** Adds a slot at the given position into the list of slots. + * Note that this function does not work during signal emission! + * @param i An iterator indicating the position where @e slot_ should be inserted. + * @param slot_ The slot to add to the list of slots. + * @return An iterator pointing to the new slot in the list. + */ + iterator_type insert(iterator_type i, const slot_base& slot_); + + /** Removes the slot at the given position from the list of slots. + * Note that this function does not work during signal emission! + * @param i An iterator pointing to the slot to be removed. + * @return An iterator pointing to the slot in the list after the one removed. + */ + iterator_type erase(iterator_type i); + + /** Returns the signal_impl object encapsulating the list of slots. + * @return The signal_impl object encapsulating the list of slots. + */ + internal::signal_impl* impl() const; + + /// The signal_impl object encapsulating the slot list. + mutable internal::signal_impl* impl_; +}; + +} //namespace sigc + +#endif /* _SIGC_SIGNAL_BASE_H_ */ diff --git a/libs/sigc++2/sigc++/slot.h b/libs/sigc++2/sigc++/slot.h new file mode 100644 index 0000000000..be3d0caa80 --- /dev/null +++ b/libs/sigc++2/sigc++/slot.h @@ -0,0 +1,9 @@ +// -*- c++ -*- +/* Do not edit! -- generated file */ + + +#ifndef _SIGC_MACROS_SLOTHM4_ +#define _SIGC_MACROS_SLOTHM4_ + +#include +#endif /* _SIGC_MACROS_SLOTHM4_ */ diff --git a/libs/sigc++2/sigc++/trackable.cc b/libs/sigc++2/sigc++/trackable.cc new file mode 100644 index 0000000000..a4f1f54e18 --- /dev/null +++ b/libs/sigc++2/sigc++/trackable.cc @@ -0,0 +1,127 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include + +SIGC_USING_STD(ostream) + +using namespace std; + +namespace sigc +{ + +trackable::trackable() +: callback_list_(0) +{} + +/* Don't copy the notification list. + The objects watching src don't need to be notified when the new object dies. */ +trackable::trackable(const trackable& /*src*/) +: callback_list_(0) +{} + +trackable& trackable::operator=(const trackable& src) +{ + if(this != &src) + notify_callbacks(); //Make sure that we have finished with existing stuff before replacing it. + + return *this; +} + +trackable::~trackable() +{ + notify_callbacks(); +} + +void trackable::add_destroy_notify_callback(void* data, func_destroy_notify func) const +{ + callback_list()->add_callback(data, func); +} + +void trackable::remove_destroy_notify_callback(void* data) const +{ + callback_list()->remove_callback(data); +} + +void trackable::notify_callbacks() +{ + if (callback_list_) + delete callback_list_; //This invokes all of the callbacks. + + callback_list_ = 0; +} + +internal::trackable_callback_list* trackable::callback_list() const +{ + if (!callback_list_) + callback_list_ = new internal::trackable_callback_list; + + return callback_list_; +} + + +namespace internal +{ + +trackable_callback_list::~trackable_callback_list() +{ + clearing_ = true; + + for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) + (*i).func_((*i).data_); +} + +void trackable_callback_list::add_callback(void* data, func_destroy_notify func) +{ + if (!clearing_) // TODO: Is it okay to silently ignore attempts to add dependencies when the list is being cleared? + // I'd consider this a serious application bug, since the app is likely to segfault. + // But then, how should we handle it? Throw an exception? Martin. + callbacks_.push_back(trackable_callback(data, func)); +} + +void trackable_callback_list::clear() +{ + clearing_ = true; + + for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) + (*i).func_((*i).data_); + + callbacks_.clear(); + + clearing_ = false; +} + +void trackable_callback_list::remove_callback(void* data) +{ + if (clearing_) return; // No circular notices + + for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) + if ((*i).data_ == data) + { + callbacks_.erase(i); + return; + } +} + +} /* namespace internal */ + + +} /* namespace sigc */ diff --git a/libs/sigc++2/sigc++/trackable.h b/libs/sigc++2/sigc++/trackable.h new file mode 100644 index 0000000000..4563738dd6 --- /dev/null +++ b/libs/sigc++2/sigc++/trackable.h @@ -0,0 +1,148 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_TRACKABLE_HPP_ +#define _SIGC_TRACKABLE_HPP_ +#include +#include + +namespace sigc { + +namespace internal { + +typedef void* (*func_destroy_notify) (void* data); + +/** Destroy notification callback. + * A destroy notification callback consists of a data pointer and a + * function pointer. The function is executed from the owning callback + * list (of type sigc::internal::trackable_callback_list) when its parent + * object (of type sigc::trackable) is destroyed or overwritten. + */ +struct SIGC_API trackable_callback +{ + void* data_; + func_destroy_notify func_; + trackable_callback(void* data, func_destroy_notify func) + : data_(data), func_(func) {} +}; + +/** Callback list. + * A callback list holds an STL list of callbacks of type + * trackable_callback. Callbacks are added and removed with + * add_callback(), remove_callback() and clear(). The callbacks + * are invoked from clear() and from the destructor. + */ +struct SIGC_API trackable_callback_list +{ + /** Add a callback function. + * @param data Data that will be sent as a parameter to teh callback function. + * @param func The callback function. + * + */ + void add_callback(void* data, func_destroy_notify func); + + /** Remove the callback which has this data associated with it. + * @param data The data that was given as a parameter to add_callback(). + */ + void remove_callback(void* data); + + /** This invokes all of the callback functions. + */ + void clear(); + + trackable_callback_list() + : clearing_(false) {} + + /** This invokes all of the callback functions. + */ + ~trackable_callback_list(); + +private: + typedef std::list callback_list; + callback_list callbacks_; + bool clearing_; +}; + +} /* namespace internal */ + + +/** Base class for objects with auto-disconnection. + * trackable must be inherited when objects shall automatically + * invalidate slots referring to them on destruction. + * A slot built from a member function of a trackable derived + * type installs a callback that is invoked when the trackable object + * is destroyed or overwritten. + * + * add_destroy_notify_callback() and remove_destroy_notify_callback() + * can be used to manually install and remove callbacks when + * notification of the object dying is needed. + * + * notify_callbacks() invokes and removes all previously installed + * callbacks and can therefore be used to disconnect from all signals. + * + * Note that there is no virtual destructor. Don't use @p trackable* + * as pointer type for managing your data or the destructors of + * your derived types won't be called when deleting your objects. + * + * @ingroup signal + */ +struct SIGC_API trackable +{ + trackable(); + + trackable(const trackable& src); + + trackable& operator=(const trackable& src); + + ~trackable(); + + /*virtual ~trackable() {} */ /* we would need a virtual dtor for users + who insist on using "trackable*" as + pointer type for their own derived objects */ + + + typedef internal::func_destroy_notify func_destroy_notify; + + /** Add a callback that is executed (notified) when the trackable object is detroyed. + * @param data Passed into func upon notification. + * @param func Callback executed upon destruction of the object. + */ + void add_destroy_notify_callback(void* data, func_destroy_notify func) const; + + /** Remove a callback previously installed with add_destroy_notify_callback(). + * The callback is not executed. + * @param data Parameter passed into previous call to add_destroy_notify_callback(). + */ + void remove_destroy_notify_callback(void* data) const; + + /// Execute and remove all previously installed callbacks. + void notify_callbacks(); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +private: + /* The callbacks are held in a list of type trackable_callback_list. + * This list is allocated dynamically when the first callback is added. + */ + internal::trackable_callback_list* callback_list() const; + mutable internal::trackable_callback_list* callback_list_; +#endif +}; + +} /* namespace sigc */ + +#endif /* _SIGC_TRACKABLE_HPP_ */ diff --git a/libs/sigc++2/sigc++/type_traits.h b/libs/sigc++2/sigc++/type_traits.h new file mode 100644 index 0000000000..b2c1a7eb2d --- /dev/null +++ b/libs/sigc++2/sigc++/type_traits.h @@ -0,0 +1,147 @@ +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_TYPE_TRAIT_H_ +#define _SIGC_TYPE_TRAIT_H_ + +#include //To get SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION + + +namespace sigc { + +template +struct type_trait +{ + typedef T_type type; + typedef T_type& pass; + typedef const T_type& take; + typedef T_type* pointer; +}; + +template +struct type_trait +{ + typedef T_type* type; + typedef T_type*& pass; + typedef const T_type*& take; + typedef T_type** pointer; +}; + +template +struct type_trait +{ + typedef T_type type; + typedef T_type& pass; + typedef T_type& take; + typedef T_type* pointer; +}; + +template +struct type_trait +{ + typedef const T_type type; + typedef const T_type& pass; + typedef const T_type& take; + typedef const T_type* pointer; +}; + +template<> +struct type_trait +{ + typedef void type; + typedef void pass; + typedef void take; + typedef void* pointer; +}; + + +// From Esa Pulkkin: +/** + * Compile-time determination of base-class relationship in C++ + * (adapted to match the syntax of boost's type_traits library). + * + * Use this to provide a template specialization for a set of types. + * For instance, + * + * template < class T_thing, bool Tval_derives_from_something = sigc::is_base_and_derived::value > + * class TheTemplate + * { + * //Standard implementation. + * } + * + * //Specialization for T_things that derive from Something (Tval_derives_from_something is true) + * template + * class TheTemplate + * { + * T_thing thing; + thing.method_that_is_in_something(); + * } + */ +template +struct is_base_and_derived +{ +private: + struct big { + char memory[64]; + }; + +#ifndef SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION + + //Allow the internal inner class to access the other (big) inner + //class. The Tru64 compiler needs this. murrayc. + friend struct internal_class; + + //Certain compilers, notably GCC 3.2, require these functions to be inside an inner class. + struct internal_class + { + static big is_base_class_(...); + static char is_base_class_(typename type_trait::pointer); + }; + +public: + static const bool value = + sizeof(internal_class::is_base_class_(reinterpret_cast::pointer>(0))) == + sizeof(char); + +#else //SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION + + //The AIX xlC compiler does not like these 2 functions being in the inner class. + //It says "The incomplete type "test" must not be used as a qualifier. + //It does not seem necessary anyway. murrayc. + static big is_base_class_(...); + static char is_base_class_(typename type_trait::pointer); + +public: + static const bool value = + sizeof(is_base_class_(reinterpret_cast::pointer>(0))) == + sizeof(char); + +#endif //SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION + + void avoid_gcc3_warning_(); //Not implemented. g++ 3.3.5 (but not 3.3.4, and not 3.4) warn that there are no public methods, even though there is a public variable. +}; + +template +struct is_base_and_derived +{ + static const bool value = true; +}; + +} /* namespace sigc */ + +#endif /* _SIGC_TYPE_TRAIT_H_ */ diff --git a/libs/sigc++2/sigc++/visit_each.h b/libs/sigc++2/sigc++/visit_each.h new file mode 100644 index 0000000000..cff27ba28b --- /dev/null +++ b/libs/sigc++2/sigc++/visit_each.h @@ -0,0 +1,174 @@ +// -*- c++ -*- +/* + * Copyright 2002, The libsigc++ Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _SIGC_VISIT_EACH_HPP_ +#define _SIGC_VISIT_EACH_HPP_ + +#include + +namespace sigc { + +namespace internal { + +//This should really be an inner class of limit_derived_target, without the T_limit template type, +//But the SUN CC 5.7 (not earlier versions) compiler finds it ambiguous when we specify a particular specialization of it. +//and does not seem to allow us to tell it explicitly that it's an inner class. +template +struct with_type; + +//Specialization for I_derived = false +template struct +with_type +{ + static void execute_(const T_type&, const T_limit&) {} +}; + +//Specialization for I_derived = true +template +struct with_type +{ + static void execute_(const T_type& _A_type, const T_limit& _A_action) + { _A_action.action_(_A_type); } +}; + + +/// Helper struct for visit_each_type(). +template +struct limit_derived_target +{ + typedef limit_derived_target T_self; + + + template + void operator()(const T_type& _A_type) const + { + with_type::value, T_type, T_self>::execute_(_A_type, *this); + } + + limit_derived_target(const T_action& _A_action) + : action_(_A_action) + {} + + T_action action_; +}; + +// Specialization for T_target pointer types, to provide a slightly different execute_() implementation. + +template +struct with_type_pointer; + +//Specialization for I_derived = false +template +struct with_type_pointer +{ + static void execute_(const T_type&, const T_limit&) {} +}; + +//Specialization for I_derived = true +template +struct with_type_pointer +{ + static void execute_(const T_type& _A_type, const T_limit& _A_action) + { _A_action.action_(&_A_type); } +}; + +template +struct limit_derived_target +{ + typedef limit_derived_target T_self; + + + template + void operator()(const T_type& _A_type) const + { + with_type_pointer::value, T_type, T_self>::execute_(_A_type, *this); + } + + limit_derived_target(const T_action& _A_action) + : action_(_A_action) + {} + + T_action action_; +}; + +} /* namespace internal */ + + +/** This function performs a functor on each of the targets of a functor. + * All unknown types just call @e _A_action on them. + * Add overloads that specialize the @e T_functor argument for your own + * functor types, so that subobjects get visited. This is needed to enable + * auto-disconnection support for your functor types. + * + * @par Example: + * @code + * struct some_functor + * { + * void operator()() {} + * some_possibly_sigc_trackable_derived_type some_data_member; + * some_other_functor_type some_other_functor; + * } + * + * namespace sigc + * { + * template + * void visit_each(const T_action& _A_action, + * const some_functor& _A_target) + * { + * visit_each(_A_action, _A_target.some_data_member); + * visit_each(_A_action, _A_target.some_other_functor); + * } + * } + * @endcode + * + * @ingroup functors + */ +template +void visit_each(const T_action& _A_action, const T_functor& _A_functor) +{ _A_action(_A_functor); } + +/** This function performs a functor on each of the targets + * of a functor limited to a restricted type. + * + * @ingroup functors + */ +template +void visit_each_type(const T_action& _A_action, const T_functor& _A_functor) +{ + typedef internal::limit_derived_target type_limited_action; + + type_limited_action limited_action(_A_action); + + //specifying the types of the template specialization prevents disconnection of bound trackable references (such as with sigc::ref()), + //probably because the visit_each<> specializations take various different template types, + //in various sequences, and we are probably specifying only a subset of them with this. + // + //But this is required by the AIX (and maybe IRIX MipsPro and Tru64) compilers. + //I guess that sigc::ref() therefore does not work on those platforms. murrayc + //visit_each(limited_action, _A_functor); + + //g++ (even slightly old ones) is our primary platform, so we could use the non-crashing version. + //However, the expliict version also fixes a crash in a slightl more common case: http://bugzilla.gnome.org/show_bug.cgi?id=169225 + //Users (and distributors) of libsigc++ on AIX (and maybe IRIX MipsPro and Tru64) do + //need to use the version above instead, to allow compilation. + visit_each(limited_action, _A_functor); +} + +} /* namespace sigc */ +#endif diff --git a/libs/sigc++2/sigc++config.h.in b/libs/sigc++2/sigc++config.h.in new file mode 100644 index 0000000000..1cd8c3e2e0 --- /dev/null +++ b/libs/sigc++2/sigc++config.h.in @@ -0,0 +1,80 @@ + +#ifndef _SIGCXX_CONFIG_H +#define _SIGCXX_CONFIG_H + +// Detect common platforms +#if defined(_WIN32) + // Win32 compilers have a lot of variation + #if defined(_MSC_VER) + #define SIGC_MSC + #define SIGC_WIN32 + #define SIGC_DLL + #elif defined(__CYGWIN__) + #define SIGC_CONFIGURE + #elif defined(__MINGW32__) + #define SIGC_WIN32 + #define SIGC_CONFIGURE + #else + //The Tru64 compiler complains about this "unrecognized preprocessing directive", but it should never get this far anyway. + //#warning "libsigc++ config: Unknown win32 architecture (send me gcc --dumpspecs or equiv)" + #endif +#else + #define SIGC_CONFIGURE +#endif /* _WIN32 */ + +#ifdef SIGC_CONFIGURE + // configure checks + #undef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #undef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #undef SIGC_SELF_REFERENCE_IN_MEMBER_INITIALIZATION + + #undef SIGC_HAVE_NAMESPACE_STD + #undef SIGC_HAVE_SUN_REVERSE_ITERATOR + #undef SIGC_TYPEDEF_REDEFINE_ALLOWED + + // platform specific macros + // #define LIBSIGC_DISABLE_DEPRECATED + // #define SIGC_NEW_DELETE_IN_LIBRARY_ONLY +#endif /* SIGC_CONFIGURE */ + +#ifdef SIGC_MSC + + // MS VC7 Warning 4251 says that the classes to any member objects in an + // exported class must be also be exported. Some of the libsigc++ + // template classes contain std::list members. MS KB article 168958 says + // that it's not possible to export a std::list instantiation due to some + // wacky class nesting issues, so our only options are to ignore the + // warning or to modify libsigc++ to remove the std::list dependency. + // AFAICT, the std::list members are used internally by the library code + // and don't need to be used from the outside, and ignoring the warning + // seems to have no adverse effects, so that seems like a good enough + // solution for now. + // + #pragma warning(disable:4251) + + #define SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD + #define SIGC_NEW_DELETE_IN_LIBRARY_ONLY // To keep ABI compatibility + #define SIGC_HAVE_NAMESPACE_STD 1 + +#endif /* SIGC_MSC */ + +//Put things in the std namespace, if they should be there. +#ifndef SIGC_HAVE_NAMESPACE_STD + # define SIGC_USING_STD(Symbol) namespace std { using ::Symbol; } +#else + # define SIGC_USING_STD(Symbol) /* empty */ +#endif + +#ifdef SIGC_DLL + #if defined(SIGC_BUILD) && defined(_WINDLL) + #define SIGC_API __declspec(dllexport) + #elif !defined(SIGC_BUILD) + #define SIGC_API __declspec(dllimport) + #else + #define SIGC_API + #endif /* SIGC_BUILD - _WINDLL */ +#else + #define SIGC_API +#endif /* SIGC_DLL */ + +#endif /* _SIGCXX_CONFIG_H */