Commit Graph

299 Commits

Author SHA1 Message Date
Frank Mori Hess
a247558d8b Added a copy of Thorsten Ottosen's auto_buffer into signals2/detail
and used it to replace stack_allocator/stack_vector (which worked 
on popular compilers but were not strictly standards conforming).


[SVN r53779]
2009-06-09 18:07:08 +00:00
Frank Mori Hess
6eba73c525 Added test for and fixed compile errors in signal::set_combiner()
and combiner() methods.  Refs #3125.



[SVN r53599]
2009-06-03 13:43:51 +00:00
Frank Mori Hess
e6718355a4 Work around overload resolution failures on gcc 3.4
[SVN r53554]
2009-06-01 19:42:04 +00:00
Frank Mori Hess
5d94b41cac Fixed compile errors with BOOST_NO_VARIADIC_TEMPLATES.
[SVN r53502]
2009-05-31 15:33:47 +00:00
Frank Mori Hess
2b6fc8ecee Fixing some reference-to-reference problems with some compilers.
[SVN r53464]
2009-05-30 17:12:01 +00:00
Frank Mori Hess
0c8296d92f Make combiners that return void work, even when
BOOST_NO_VOID_RETURNS is defined.  Stopped slot_result_type
from being dishonest when slot returns void and BOOST_NO_VOID_RETURNS
is defined.



[SVN r53400]
2009-05-29 17:35:35 +00:00
Frank Mori Hess
feea7d1e38 Added inheritance of variadic signal/slot from std::unary_function or
std::binary_function as appropriate.


[SVN r53392]
2009-05-29 15:05:10 +00:00
Frank Mori Hess
2bd5533ae9 Forgot to convert one use of old vararg_count to sizeof...().
[SVN r53391]
2009-05-29 14:30:53 +00:00
Frank Mori Hess
e53f1d2a3c Fixed some test errors caused by sig_type::slot_type::signature_type not existing.
Replaced unneeded vararg_count with sizeof...().


[SVN r53390]
2009-05-29 13:34:42 +00:00
Frank Mori Hess
687dee2875 Added signature_type member typedef to variadic signal implementation.
Also added it to slot classes.



[SVN r53359]
2009-05-28 19:44:44 +00:00
Frank Mori Hess
fbb9988f5f Added some files I forgot to add with changeset [53355]
[SVN r53356]
2009-05-28 19:00:01 +00:00
Frank Mori Hess
4acf719aa9 Added variadic signal/slot implementations used when
BOOST_NO_VARIADIC_TEMPLATES is not defined.  The
signal0, signal1, etc classes are not available when using
the variadic implementations, I plan to mark them as
deprecated.  Also the arg1_type, arg2_type member typedefs
are not available and are replaced with a "arg" member
template class.  Documentation updates to follow.



[SVN r53355]
2009-05-28 18:49:27 +00:00
Frank Mori Hess
e4266bf7f6 Tweaked #include directives a little.
[SVN r53354]
2009-05-28 18:45:22 +00:00
Frank Mori Hess
ee17e4f734 Use BOOST_NO_VARIADIC_TEMPLATES instead of BOOST_HAS_VARIADIC_TMPL, etc.
[SVN r53353]
2009-05-28 18:37:40 +00:00
Frank Mori Hess
79625c90d0 Patch from Richard Webb for msvc10 compile error, refs #3091
[SVN r53294]
2009-05-27 01:48:08 +00:00
Frank Mori Hess
6183fc34c3 Added shared_connection_block::connection() query, and a
connection::operator!=().  Added a test of shared_connection_block
assignment.


[SVN r53131]
2009-05-20 15:16:37 +00:00
Frank Mori Hess
ca91bb77bd Made shared_connection_block default constructible. Split shared_connection_block
tests out of deletion_test, and added a little test for a 
default-constructed shared_connection_block.


[SVN r53128]
2009-05-20 14:36:49 +00:00
Frank Mori Hess
87ff0db5fc Added ability to create a shared_connection_block which is initially
not blocking.



[SVN r53091]
2009-05-18 16:59:28 +00:00
Frank Mori Hess
bbb008318e Fix for some compile warnings from Kyle Girard <theycallmecoach@gmail.com>.
[SVN r52659]
2009-04-29 13:53:18 +00:00
Frank Mori Hess
77ee47ffd6 Added some equality comparison operators for stack_allocator.
[SVN r52654]
2009-04-28 18:17:24 +00:00
Frank Mori Hess
fd7e977c28 Trying to fix compile problems on msvc 9 in release mode.
[SVN r52627]
2009-04-27 13:07:50 +00:00
Frank Mori Hess
23939a55eb Fix c++0x perfect forwarding for deconstruct.
[SVN r52477]
2009-04-19 02:18:51 +00:00
Frank Mori Hess
422ceee998 Fixed compile errors in c++0x mode.
[SVN r52404]
2009-04-15 12:45:41 +00:00
Frank Mori Hess
e265943d61 signals2/signal.hpp does not need to include signals2/shared_connection_block.hpp.
[SVN r52385]
2009-04-14 14:21:18 +00:00
Frank Mori Hess
35ea409775 Consolidated some redundant macros. Made BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS
settable by user.


[SVN r52372]
2009-04-13 19:52:21 +00:00
Frank Mori Hess
4bdee4633b Fixed a few more copyright/license issues detected by
inspection report.



[SVN r51671]
2009-03-09 21:23:14 +00:00
Daniel James
c9bb9ec451 Fix a couple of minor signals2 documentation issues.
[SVN r51669]
2009-03-09 20:57:06 +00:00
Frank Mori Hess
6b9f7b001e Finally fixed some odd test errors on msvc9.
[SVN r51640]
2009-03-07 16:44:27 +00:00
Frank Mori Hess
37805661eb some inspect cleanups (mostly getting rid of tabs).
[SVN r51636]
2009-03-06 16:17:16 +00:00
Frank Mori Hess
dff6be7def Trying to work around msvc 9 apparently compiling unused member f
unctions in templates.


[SVN r51620]
2009-03-05 13:33:40 +00:00
Frank Mori Hess
a67605599f Deal with compile errors caused by enable_shared_from_this reversions.
Added check to make sure postconstructor_invoker doesn't call
adl_postconstruct multiple times.



[SVN r51610]
2009-03-04 16:39:05 +00:00
Frank Mori Hess
d44d7caed1 Fixed "looser throw specifier for virtual" compile errors.
[SVN r51605]
2009-03-04 14:24:15 +00:00
Frank Mori Hess
8c8c0587b5 Added const qualification to no_slots_error::what().
[SVN r51575]
2009-03-03 15:43:58 +00:00
Frank Mori Hess
987a3f4f1c Quiet a compiler warning on msvc 7.1
[SVN r51573]
2009-03-03 15:06:48 +00:00
Frank Mori Hess
c3d7dd6ae0 Trying to fix compile error on mutex_test.cpp on msvc9
[SVN r51572]
2009-03-03 15:04:06 +00:00
Frank Mori Hess
4d8daa4abd Merged Signals2 from sandbox to trunk.
[SVN r51520]
2009-03-01 20:54:34 +00:00
Frank Mori Hess
80485f528a Moved deconstruct_access from signals2::detail to signals2 namespace,
and got rid of using declaration that caused problems on visual studio 2005.


[SVN r51420]
2009-02-24 01:02:49 +00:00
Frank Mori Hess
3a48ca503f Added signature_type typedef to signals2::signal.
[SVN r51419]
2009-02-24 01:01:04 +00:00
Frank Mori Hess
48399f1edb On second though, I don't like automatically tracking
weak_ptr<signals2::trackable> and weak_ptr<signals2::signal>.



[SVN r51411]
2009-02-23 05:30:12 +00:00
Frank Mori Hess
8c1c6218ce Added automatic tracking of weak_ptr<signals2::trackable> and
weak_ptr<signals2::signal> objects via visit_each.



[SVN r51398]
2009-02-22 19:48:39 +00:00
Frank Mori Hess
1710995cfa Fixed deconstruct when used with enable_shared_from_this
[SVN r51037]
2009-02-05 20:58:10 +00:00
Frank Mori Hess
44f2fc27d8 Removed obsolete calls to detail::do_postconstruct
[SVN r51034]
2009-02-05 19:58:17 +00:00
Frank Mori Hess
b0e87e825c Tweaked conversion operator of postconstruct_invoker.
[SVN r51011]
2009-02-04 16:21:05 +00:00
Frank Mori Hess
2935441893 Added a missing forward declaration.
[SVN r50998]
2009-02-03 19:19:37 +00:00
Frank Mori Hess
a266d6c1d4 Fixed return type for 0 argument and variadic deconstruct overloads.
[SVN r50968]
2009-02-02 16:51:18 +00:00
Frank Mori Hess
3eda4231b9 Made postconstructor_invoker constructor private.
[SVN r50939]
2009-02-01 02:21:21 +00:00
Frank Mori Hess
2a4c44e298 Reworked deconstruct<>() so it operates non-intrusively via
argument-dependent lookup instead of needing postconstructible
and predestructible base classes.  Also added support for
passing arguments to postconstructors.



[SVN r50938]
2009-02-01 01:12:03 +00:00
Frank Mori Hess
3784c7bdcb Patch for msvc 7.1 from Adam Butcher
[SVN r50899]
2009-01-30 12:56:12 +00:00
Frank Mori Hess
da5e7c76d8 Added new headers to signals2.hpp convenience header.
[SVN r50785]
2009-01-26 16:17:07 +00:00
Frank Mori Hess
41326c4451 Changed NAMED_SIGNATURE_PARAMETER macro to
BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER.  Added requirement
that Signature parameter be a function type.


[SVN r50783]
2009-01-26 15:31:37 +00:00
Frank Mori Hess
2870068625 We're supposed to use parameter::value_type instead of parameter::binding for
named template parameters.



[SVN r50750]
2009-01-23 21:14:59 +00:00
Frank Mori Hess
2d2d242d2a Added signal_type metafunction which uses Boost.Parameter
to enable named template type parameters when
declarng signals.


[SVN r50747]
2009-01-23 16:14:14 +00:00
Frank Mori Hess
c357603334 Made postconstructible and predestructible abstract base classes.
[SVN r50715]
2009-01-21 21:57:05 +00:00
Frank Mori Hess
b6a8f089bb Don't do deep copies of both combiner and connection list
when only one or the other needs to be copied.



[SVN r50701]
2009-01-21 15:42:02 +00:00
Frank Mori Hess
e12ebe4a1f Optimized copying of deconstruct_deleter.
[SVN r50655]
2009-01-17 17:18:22 +00:00
Frank Mori Hess
524e79f296 changed sp_ms_deleter to deconstruct_deleter.
[SVN r50643]
2009-01-16 21:04:11 +00:00
Frank Mori Hess
bbc093ae4d Added boost::signals2::deconstruct, which is similar to boost::make_shared
except with postconstructible/predestructible support.  All overloads of
deconstruct may be made a friend by making 
boost::signals2::deconstruct_access a friend.



[SVN r50642]
2009-01-16 20:55:42 +00:00
Frank Mori Hess
c523e1fb11 Made shared_connection_block::blocking show its documented
behavior even after underlying connection has expired.


[SVN r50598]
2009-01-14 20:46:43 +00:00
Frank Mori Hess
d56dcc3ec0 Brought back trackable class, to ease porting of existing
single-threaded code from Boost.Signals to Boost.Signals2.



[SVN r50579]
2009-01-14 16:58:30 +00:00
Frank Mori Hess
5ed2a2b159 Added check for BOOST_HAS_WINTHREADS when determining
what os-specific header to use.


[SVN r50578]
2009-01-14 16:52:13 +00:00
Frank Mori Hess
9be331047d Fixed tracking of null but not empty shared_ptr (broken by recent optimization
changes).


[SVN r50319]
2008-12-18 22:09:36 +00:00
Frank Mori Hess
0c7f7dcf76 Make sure weak_ptr is expired, and doesn't just refer to a null
shared_ptr.



[SVN r50280]
2008-12-15 19:34:09 +00:00
Frank Mori Hess
1893022493 Made sure all macros defined by Signals2 are prefixed by BOOST_SIGNALS2_.
[SVN r50271]
2008-12-14 17:23:07 +00:00
Frank Mori Hess
128ffcc61d Optimized invocation speed with respect to overhead from copying signal arguments.
[SVN r50253]
2008-12-12 21:48:19 +00:00
Frank Mori Hess
d05cd6df9d Opimized speed with respect to automatic tracking overhead
during signal invocation.



[SVN r50252]
2008-12-12 21:34:58 +00:00
Frank Mori Hess
4e5ff310ae Fixed bug in default ExtendedSlotFunction template type parameter
for preferred syntax signals2::signal.  Added test code for
extended slots to signal_test.



[SVN r49593]
2008-11-04 21:03:16 +00:00
Frank Mori Hess
5aa7704586 Use boost::throw_exception instead of throw.
[SVN r49585]
2008-11-04 16:37:44 +00:00
Frank Mori Hess
fc61b2b7d2 renamed BOOST_SIGNALS_MAX_ARGS to BOOST_SIGNALS2_MAX_ARGS to avoid conflict
with original Boost.Signals.



[SVN r49521]
2008-11-01 16:59:29 +00:00
Frank Mori Hess
b224d2adf7 Fixed a compile warning and added missing declaration of
TryEnterCriticalSection when not using windows.h.


[SVN r49395]
2008-10-20 03:27:36 +00:00
Frank Mori Hess
f900c0c6ec Fix compile error when targeting windows platforms before
NT 4.



[SVN r49391]
2008-10-19 15:56:28 +00:00
Frank Mori Hess
201b2a8c74 Got rid of some partial template specialization, for the sake of ancient
compilers using the portable syntax.  Tweaked handling of void returns.
Added a description for signalN::slot_result_type.



[SVN r49226]
2008-10-09 21:16:54 +00:00
Frank Mori Hess
1a50f64fca Made include guard macro names consistent.
[SVN r49219]
2008-10-09 18:38:49 +00:00
Frank Mori Hess
2d90b9df81 Made names of include guard macros consistent.
[SVN r49218]
2008-10-09 18:25:47 +00:00
Frank Mori Hess
50c3420bb5 Added extended_slot_type and connect_extended() to signal classes.
[SVN r49182]
2008-10-08 18:11:22 +00:00
Frank Mori Hess
3e255edc25 Replaced some tab indentation with spaces.
[SVN r49163]
2008-10-07 14:20:07 +00:00
Frank Mori Hess
98f64bb353 automatically track signals that are wrapped in a boost::reference_wrapper.
[SVN r49116]
2008-10-02 18:19:40 +00:00
Frank Mori Hess
3706aab7f1 Fixed recognition of const signal as a signal.
[SVN r49115]
2008-10-02 18:17:49 +00:00
Frank Mori Hess
37414f5597 Brought back slot self-disconnection via throwing expired_slot, as it's the
only thread-safe way for a slot to disconnect itself.



[SVN r49102]
2008-10-02 01:34:35 +00:00
Frank Mori Hess
b9ce20dc1d Added missing "inline" for free connection swap function.
[SVN r49084]
2008-10-01 15:50:14 +00:00
Frank Mori Hess
322cf4fee9 Added test to make sure slot.hpp can compile on its
own, and added missing include so it passes.



[SVN r49082]
2008-10-01 15:11:00 +00:00
Frank Mori Hess
4ba9db8e27 Added signals2::optional_last_value, and made it the default
combiner for signals.  It is preferrable to last_value since it
never throws.


[SVN r49076]
2008-09-30 20:28:23 +00:00
Frank Mori Hess
bfd79d94a1 Simplified behavior of scoped_connection::release. Removed swaps
for scoped_connection since the base class swaps work fine for
scoped_connection too now.


[SVN r49068]
2008-09-30 15:35:42 +00:00
Frank Mori Hess
4cbb8f8f91 Combiners don't have to catch expired_slot anymore.
[SVN r49035]
2008-09-29 20:31:51 +00:00
Frank Mori Hess
9e0d1840d8 Added scoped_connection::released() query, mostly because it makes it
easier to document the class' behavior.  Updated scoped_connection
documentation to make it more complete and up to date.


[SVN r49014]
2008-09-29 17:10:41 +00:00
Frank Mori Hess
d41fec8061 Renamed signals2::lightweight_mutex to signals2::mutex.
[SVN r49005]
2008-09-29 15:13:23 +00:00
Frank Mori Hess
87c9cf74fd Tweaked interface of connection_body_base a bit. Added free swap functions
for connection classes.  Added scoped_connection::release.  Made
scoped_connection noncopyable.


[SVN r49003]
2008-09-29 15:05:04 +00:00
Frank Mori Hess
28252d9ae8 Pass arguments of slotN constructor which is bind syntactic sugar
as const references instead of as values.



[SVN r48978]
2008-09-26 20:11:42 +00:00
Frank Mori Hess
d6db6ccd64 Make sure we are using boost::signals2::last_value, not boost::last_value.
[SVN r48977]
2008-09-26 18:58:32 +00:00
Frank Mori Hess
1bc2f21297 Replaced ThreadingModel template parameter with Mutex, which must be
a model of the Lockable concept from Boost.Thread plus DefaultConstructible.



[SVN r48953]
2008-09-24 19:45:32 +00:00
Frank Mori Hess
4918d671c8 Made predestructible::predestruct protected.
[SVN r48944]
2008-09-24 14:41:31 +00:00
Frank Mori Hess
ac38694500 Changed some names to better conform to boost coding guidelines.
[SVN r48942]
2008-09-24 14:21:55 +00:00
Frank Mori Hess
7c2e42b5ce Fixed some issues caused by header and namespace rearrangements
[SVN r48941]
2008-09-24 14:21:03 +00:00
Frank Mori Hess
fbe7e784c6 Added missing include.
[SVN r48940]
2008-09-24 14:19:44 +00:00
Frank Mori Hess
6dee5717fb Removed abi prefix/suffix since this is a header-only lib.
[SVN r48933]
2008-09-23 20:44:10 +00:00
Frank Mori Hess
d8de489212 Moved everything into signals2 namespace. Moved headers
accordingly to conform with boost policy.  Have not
updated documentation to reflect changes yet.


[SVN r48932]
2008-09-23 20:23:22 +00:00
Frank Mori Hess
9f1266de69 Use ADL for swap.
[SVN r48401]
2008-08-27 02:21:53 +00:00
Frank Mori Hess
a00cd1ca4c I think this will make grouped_list copy constructor run in
O(n) time instead of O(n log n).



[SVN r43564]
2008-03-11 16:15:43 +00:00
Frank Mori Hess
1ad95628c5 Added proper copy constructor for grouped_list, to prevent invalid
list iterators in map.



[SVN r43563]
2008-03-11 15:12:20 +00:00
Frank Mori Hess
90fc572c68 Worked around bogus error when using g++ checked iterators.
[SVN r43556]
2008-03-10 20:56:44 +00:00
Frank Mori Hess
79f09682d9 Added disconnect() call to assignment operator of scoped_connection, fixing
bug reported by 'Steve Hand' <biomech@bionyx.ca>.



[SVN r43553]
2008-03-10 19:47:41 +00:00
Frank Mori Hess
60a07d0426 Added me as author.
[SVN r43552]
2008-03-10 19:46:29 +00:00
Frank Mori Hess
59c7b6c218 Fixed bogus assertion failure, reported by Steve Hand.
[SVN r43432]
2008-02-28 19:59:40 +00:00
Frank Mori Hess
411c9158ed A signal used as a slot should throw an expired_slot exception,
instead of a bad_weak_ptr.



[SVN r43427]
2008-02-27 20:05:27 +00:00
Frank Mori Hess
83b7bd60c7 Fixed include guard in auto_threaded.hpp from conflicting with
multi_threaded.hpp.



[SVN r43015]
2008-01-29 20:49:58 +00:00
Frank Mori Hess
087da776e9 Added support for tracking signal objects. Moved signal_base out
of detail namespace, since it is used as an argument in a public
method now.  Fixed track_test.cpp to use new signal tracking
method.


[SVN r42446]
2008-01-03 22:10:00 +00:00
Frank Mori Hess
18c90fedc1 Koenig lookup isn't working.
[SVN r42392]
2007-12-31 18:11:27 +00:00
Frank Mori Hess
df52509ee4 Use koenig lookup to find swap() function.
[SVN r42232]
2007-12-21 18:55:35 +00:00
Frank Mori Hess
6df8e11675 Removed more title 17 comments. Use same email address for me everywhere.
[SVN r39559]
2007-09-26 20:35:07 +00:00
Frank Mori Hess
48e789142b Removed US gov copyright related notices, since this no longer
involves just US gov employees.


[SVN r39558]
2007-09-26 20:30:35 +00:00
Frank Mori Hess
7e8fee8ddb Fixed minor typo in comment.
[SVN r39496]
2007-09-24 02:11:27 +00:00
Frank Mori Hess
3c64b1b7e5 Moved boost::signalslib::detail::slot_base to boost::signalslib::slot_base,
since it has been exposed in the API by one of the slot::track
methods.




[SVN r39493]
2007-09-24 00:18:48 +00:00
Frank Mori Hess
c485776c4c Pruned some dead debugging code.
[SVN r39456]
2007-09-21 19:07:18 +00:00
Frank Mori Hess
f7329a8298 Removed some reminders of obsolete EPG namespace.
[SVN r39455]
2007-09-21 19:06:07 +00:00
Frank Mori Hess
0da67d9a8e Indent with spaces instead of tabs, as specified by boost coding guidelines.
[SVN r39454]
2007-09-21 18:59:41 +00:00
Frank Mori Hess
7058019227 Attempt to suppress unused variable warnings on
MSVC 7.1



[SVN r4497]
2007-06-08 13:44:11 +00:00
Frank Mori Hess
c82c37fea7 Fix for some unused parameter warnings, from
David Matz <david.matz@spatialview.com>


[SVN r4492]
2007-06-07 20:27:59 +00:00
Frank Mori Hess
871eb30f0d Fix for compilation error under MSVC 7.1
[SVN r4491]
2007-06-07 20:23:01 +00:00
Frank Mori Hess
2d0b5ba0cf Patch from "Stjepan Rajko" <stipe@asu.edu> that fixes some
compile warnings and a compile error under MSVC.


[SVN r3794]
2007-03-18 23:12:00 +00:00
Frank Mori Hess
8d85e04b85 Fixed compilation errors when signals/slot.hpp is included by
itself.


[SVN r3776]
2007-03-13 17:22:08 +00:00
Frank Mori Hess
b25c8332e1 Fixed some confusion over ConnectionBody template parameter.
[SVN r3775]
2007-03-09 14:27:22 +00:00
Frank Mori Hess
f441823a89 Declare null_deleter as extern inline.
[SVN r3773]
2007-03-07 16:29:35 +00:00
Frank Mori Hess
9af73230c1 Removed obsolete header track.hpp
[SVN r3772]
2007-03-07 14:42:14 +00:00
Frank Mori Hess
c41ae098e5 Added some missing BOOST_ABI_PREFIX/BOOST_ABI_SUFFIX
[SVN r3768]
2007-03-06 18:17:31 +00:00
Frank Mori Hess
02af416ff3 Added use of BOOST_STATIC_CONSTANT.
[SVN r3767]
2007-03-06 16:59:33 +00:00
Frank Mori Hess
33ee0681b3 Added shared_connection_block::blocking() query.
[SVN r3766]
2007-03-06 16:58:30 +00:00
Frank Mori Hess
e7382cd7c0 Removed overload of slot::track() that takes a signal reference,
since signals cannot be tracked in general (except in the usual way
all other objects can be tracked.


[SVN r3764]
2007-03-05 21:08:38 +00:00
Frank Mori Hess
5c96f547cd Added shared_connection_block::block() to allow user to
re-acquire block without creating a new shared_connection_block
object.


[SVN r3761]
2007-03-05 15:34:36 +00:00
Frank Mori Hess
011fdb87b5 Throw more specific "expired_slot" exception, derived from bad_weak_ptr
when slot is called with an expired tracked object.


[SVN r3760]
2007-03-05 15:10:55 +00:00
Frank Mori Hess
0ac91083af Restored explicit slot-to-slot tracking, since implicit version
only detects slot expiration on invocation.


[SVN r3759]
2007-03-05 14:52:46 +00:00
Frank Mori Hess
84dd05468f Made slots throw bad_weak_ptr when called with expired tracked
objects.  Combiners now have to catch bad_weak_ptr exceptions
thrown on slot iterator dereference.  Tracking works automatically
now for slots that call other slots.


[SVN r3756]
2007-03-02 22:04:47 +00:00
Frank Mori Hess
95c9712920 Added const overload of slot::operator()()
[SVN r3755]
2007-03-02 19:34:30 +00:00
Frank Mori Hess
61a18d5ac0 Got rid of signalslib::connection::block() and unblock() and replaced
them with exception-safe signalslib::shared_connection_block() class.
The new way is also more useable in a multi-threaded context, since
it prevents one thread from unexpectedly unblocking a
connection that another thread wants blocked.


[SVN r3754]
2007-03-02 16:00:39 +00:00
Frank Mori Hess
b0be180326 Tweaked constant-time garbage collection to clean up long contiguous
blocks of dangling connections in one pass.


[SVN r3753]
2007-03-01 19:06:09 +00:00
Frank Mori Hess
3acddc8716 Fixed some problems with slot ordering due to my misunderstanding
of how std::map::insert() handles the case of an already existing
key.


[SVN r3752]
2007-03-01 18:57:35 +00:00
Frank Mori Hess
66f76f5839 Restored per-slot locking, due to unresolvable failures in deletion_test.cpp.
Restored ThreadingModel parameter due to popular demand, but made default
"signals::auto_threaded" which uses the lightweight_mutex.  Removed
obsolete trackable.hpp.


[SVN r3751]
2007-03-01 15:57:25 +00:00
Frank Mori Hess
3d2cd4ca2a Got rid of per-slot mutexes and ThreadingModel template parameter.
Use boost/detail/lightweight_mutex.hpp for the mutex now.  Still
need to optimize locking so it doesn't lock the mutex once for
every slot during invocation.


[SVN r3749]
2007-02-28 20:48:30 +00:00
Frank Mori Hess
fcb6e2e506 Fixed signal::disconnect() with a slot function argument, which
was broken by recent changes to slot class.


[SVN r3747]
2007-02-28 19:30:18 +00:00
Frank Mori Hess
9f7d76cdb0 Added missing typename to fix compile under gcc 4.1.2
[SVN r3745]
2007-02-28 17:08:48 +00:00
Frank Mori Hess
3f98854422 Added typedefs to slot class for argN_type, and added "arity" constant.
[SVN r3743]
2007-02-28 17:06:53 +00:00
Frank Mori Hess
877777b79f Fixed tracking of signals as slots, and added a test for same.
[SVN r3742]
2007-02-28 16:19:41 +00:00
Frank Mori Hess
bef2bfc4fb Added some templated copy constructors to slot class, to prevent
loss of tracking on copy construction.


[SVN r3741]
2007-02-28 15:54:22 +00:00
Frank Mori Hess
a7d581107b Added Signature template parameter to slot class, so that an
operator() could be added.  Bind can be used to bind together
slots with different signatures now.  Added some syntactic
sugar to slot constructors, so a bind() call is inserted automatically
for the constructors that take more than one argument.
All tracking for automatic connection
management is now done through slot::track().
Added track_test.cpp test program, which tests some of the new
functionality.


[SVN r3738]
2007-02-27 21:19:25 +00:00
Frank Mori Hess
54c4fe3f19 Handle reference-wrapped values gracefully for the sake of the
2 parameter version of track().


[SVN r3734]
2007-02-22 20:47:20 +00:00
Frank Mori Hess
d68126b028 Changed order of parameters in signals::track().
[SVN r3733]
2007-02-22 20:23:48 +00:00
Frank Mori Hess
6d1e6bdc0f tracked object returned by single argument track() should at least
support conversion back into a shared_ptr.


[SVN r3732]
2007-02-22 19:51:20 +00:00
Frank Mori Hess
ca88cf698c Forget about trying to support implicit conversions for the sake of
easy binding.  The user can use the two argument form of track if
they need to.


[SVN r3731]
2007-02-22 18:54:58 +00:00
Frank Mori Hess
0153eec102 Added support for 2-argument form of signalslib::track(), which allows
value and shared_ptr to be specified independantly.


[SVN r3730]
2007-02-22 16:57:12 +00:00
Frank Mori Hess
e3fbf95743 Made add_tracked() a public member of the slot class, so arbitrary
objects can be added for the purpose of automatic connection management.


[SVN r3728]
2007-02-21 20:28:14 +00:00
Frank Mori Hess
61dfcafcb6 It's silly to make track() support reference-wrapped arguments.
[SVN r3726]
2007-02-21 15:15:23 +00:00
Frank Mori Hess
57700dba13 Fixed a race that made it possible for two slot iterators to fail a test
for equality after one was copy constructed or assigned from the other.


[SVN r3721]
2007-02-20 13:32:23 +00:00