Home | History | Annotate | Download | only in base

Lines Matching refs:Bind

5 #include "base/bind.h"
167 // Some test functions that we can Bind to.
265 Callback<int()> c0 = Bind(&Sum, 32, 16, 8, 4, 2, 1);
268 Callback<int(int)> c1 = Bind(&Sum, 32, 16, 8, 4, 2);
271 Callback<int(int,int)> c2 = Bind(&Sum, 32, 16, 8, 4);
274 Callback<int(int,int,int)> c3 = Bind(&Sum, 32, 16, 8);
277 Callback<int(int,int,int,int)> c4 = Bind(&Sum, 32, 16);
280 Callback<int(int,int,int,int,int)> c5 = Bind(&Sum, 32);
283 Callback<int(int,int,int,int,int,int)> c6 = Bind(&Sum);
289 Callback<int(int,int,int,int,int,int)> c6 = Bind(&Sum);
292 Callback<int(int,int,int,int,int)> c5 = Bind(c6, 32);
295 Callback<int(int,int,int,int)> c4 = Bind(c5, 16);
298 Callback<int(int,int,int)> c3 = Bind(c4, 8);
301 Callback<int(int,int)> c2 = Bind(c3, 4);
304 Callback<int(int)> c1 = Bind(c2, 2);
307 Callback<int()> c0 = Bind(c1, 1);
311 // Test that currying the rvalue result of another Bind() works correctly.
312 // - rvalue should be usable as argument to Bind().
316 Closure cb = base::Bind(&TakesACallback, base::Bind(&PtrArgSet, &n));
318 // If we implement Bind() such that the return value has auto_ptr-like
347 Closure normal_cb = Bind(&VoidFunc0);
349 Bind(&PolymorphicIdentity<NoRef*>, &no_ref_);
353 Closure method_cb = Bind(&HasRef::VoidMethod0, &has_ref_);
354 Closure method_refptr_cb = Bind(&HasRef::VoidMethod0,
356 Closure const_method_nonconst_obj_cb = Bind(&HasRef::VoidConstMethod0,
358 Closure const_method_const_obj_cb = Bind(&HasRef::VoidConstMethod0,
367 Closure virtual_set_cb = Bind(&Parent::VirtualSet, &child);
372 Closure non_virtual_set_cb = Bind(&Parent::NonVirtualSet, &child);
390 Callback<int()> normal_cb = Bind(&IntFunc0);
391 Callback<int()> method_cb = Bind(&HasRef::IntMethod0, &has_ref_);
393 Bind(&HasRef::IntConstMethod0, &has_ref_);
395 Bind(&HasRef::IntConstMethod0, const_has_ref_ptr_);
417 Closure normal_func_cb = Bind(IgnoreResult(&IntFunc0));
421 Bind(IgnoreResult(&HasRef::IntMethod0), &has_ref_);
425 Bind(IgnoreResult(&HasRef::IntConstMethod0), &has_ref_);
432 Bind(IgnoreResult(&NoRef::IntMethod0), weak_factory.GetWeakPtr());
436 Bind(IgnoreResult(&NoRef::IntConstMethod0), weak_factory.GetWeakPtr());
458 Callback<int()> bind_primitive_cb = Bind(&Identity, n);
462 Bind(&PolymorphicIdentity<int*>, &n);
465 Callback<int()> bind_int_literal_cb = Bind(&Identity, 3);
469 Bind(&CStringIdentity, "hi");
473 Bind(&PolymorphicIdentity<int>, 4);
478 Callback<int()> bind_object_cb = Bind(&UnwrapNoRefParent, p);
483 Bind(&PolymorphicIdentity<IncompleteType*>, incomplete_ptr);
488 Callback<int()> bind_promotes_cb = Bind(&UnwrapNoRefParent, c);
493 Bind(&UnwrapNoRefParentPtr, &c);
498 Bind(&UnwrapNoRefParentConstRef, c);
511 Callback<void(int)> unbound_value_cb = Bind(&VoidPolymorphic<int>::Run);
512 Callback<void(int*)> unbound_pointer_cb = Bind(&VoidPolymorphic<int*>::Run);
513 Callback<void(int&)> unbound_ref_cb = Bind(&VoidPolymorphic<int&>::Run);
515 Bind(&VoidPolymorphic<const int&>::Run);
517 Bind(&VoidPolymorphic<int[]>::Run);
519 Bind(&VoidPolymorphic<int[2]>::Run);
521 Bind(&VoidPolymorphic<int[][2]>::Run);
524 Bind(&VoidPolymorphic<int, int&>::Run, 1);
531 Callback<void(int&)> unbound_ref_cb = Bind(&RefArgSet);
544 Callback<int()> ref_copies_cb = Bind(&Identity, ref_n);
549 Callback<int()> const_ref_copies_cb = Bind(&Identity, const_ref_n);
562 Callback<int()> array_cb = Bind(&ArrayGet, array, 1);
565 Callback<int()> const_array_cb = Bind(&ArrayGet, *const_array_ptr, 1);
604 Bind(&NoRef::VoidMethod0, Unretained(&no_ref_));
608 Bind(&NoRef::VoidConstMethod0, Unretained(&no_ref_));
612 Bind(&NoRef::VoidConstMethod0, Unretained(const_no_ref_ptr_));
630 Bind(&NoRef::VoidMethod0, weak_factory.GetWeakPtr());
634 Bind(&NoRef::VoidConstMethod0, const_weak_factory.GetWeakPtr());
638 Bind(&NoRef::VoidConstMethod0, const_weak_factory.GetWeakPtr());
642 Bind(&FunctionWithWeakFirstParam, weak_factory.GetWeakPtr());
663 Callback<int()> copy_cb = Bind(&Identity, n);
664 Callback<int()> const_ref_cb = Bind(&Identity, ConstRef(n));
675 Bind(&GetCopies, ConstRef(counter));
683 // due to a bug in base::Bind(), there's an extra call when invoking the
692 Bind(&FunctionWithScopedRefptrFirstParam, base::ConstRef(refptr), 1);
704 Bind(&PolymorphicIdentity<DeleteCounter*>, Owned(counter));
714 Bind(&DeleteCounter::VoidMethod0, Owned(counter));
733 Bind(&PassThru<scoped_ptr<DeleteCounter> >, Passed(&ptr));
745 Bind(&PassThru<scoped_ptr<DeleteCounter> >,
765 Bind(&PassThru<scoped_ptr<DeleteCounter> >);
776 Bind(&PassThru<std::unique_ptr<DeleteCounter>>, Passed(&ptr));
788 Bind(&PassThru<std::unique_ptr<DeleteCounter>>,
808 cb_unbound = Bind(&PassThru<std::unique_ptr<DeleteCounter>>);
825 Bind(&VoidPolymorphic<CopyCounter>::Run, counter);
832 Bind(&VoidPolymorphic<CopyCounter>::Run);
841 Bind(&VoidPolymorphic<CopyCounter>::Run);
863 // - Can bind a __fastcall function.
864 // - Can bind a __stdcall function.
866 Callback<int()> fastcall_cb = Bind(&FastCallFunc, 1);
869 Callback<int()> stdcall_cb = Bind(&StdCallFunc, 2);
880 EXPECT_DEATH(base::Bind(null_cb, 42), "");