Пример #1
0
	Signal_v1(const Signal_v1 &copy) : Signal(copy), impl(new Signal_v1_Generic(this))
	{
		impl->slots = copy.impl->slots;
		for (SlotIterator slot_it = impl->slots.begin(); slot_it != impl->slots.end(); slot_it++)
		{
			Slot slot = *slot_it;
			slot->add_signal_ref(this);
		}
	}
Пример #2
0
	Signal_v1 &operator =(const Signal_v1 &copy)
	{
		if (impl->in_call) impl->deleted = true;
		else delete impl;

		impl = new Signal_v1_Generic(this);
		impl->slots = copy.impl->slots;
		for (SlotIterator slot_it = impl->slots.begin(); slot_it != impl->slots.end(); slot_it++)
		{
			Slot slot = *slot_it;
			slot->add_signal_ref(this);
		}
		return *this;
	}
Пример #3
0
	//: Connect slot.
	::Slot connect(Slot slot)
	{
		slot->add_signal_ref(this);
		impl->slots.push_back(slot);
		return ::Slot(slot);
	}