<s>
Signals	B-Language
and	I-Language
slots	I-Language
is	O
a	O
language	O
construct	O
introduced	O
in	O
Qt	B-Language
for	O
communication	O
between	O
objects	O
which	O
makes	O
it	O
easy	O
to	O
implement	O
the	O
observer	B-Language
pattern	I-Language
while	O
avoiding	O
boilerplate	O
code	O
.	O
</s>
<s>
The	O
concept	O
is	O
that	O
GUI	B-Application
widgets	O
can	O
send	O
signals	O
containing	O
event	O
information	O
which	O
can	O
be	O
received	O
by	O
other	O
widgets	O
/	O
controls	O
using	O
special	O
functions	O
known	O
as	O
slots	O
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
C/C	O
++	O
function	B-Language
pointers	I-Language
,	O
but	O
signal/slot	O
system	O
ensures	O
the	O
type-correctness	O
of	O
callback	O
arguments	O
.	O
</s>
<s>
The	O
signal/slot	O
system	O
fits	O
well	O
with	O
the	O
way	O
graphical	B-Application
user	I-Application
interfaces	I-Application
are	O
designed	O
.	O
</s>
<s>
Similarly	O
,	O
the	O
signal/slot	O
system	O
can	O
be	O
used	O
for	O
other	O
non-GUI	O
usages	O
,	O
for	O
example	O
asynchronous	B-Architecture
I/O	I-Architecture
(	O
including	O
sockets	O
,	O
pipes	O
,	O
serial	O
devices	O
,	O
etc	O
.	O
)	O
</s>
<s>
It	O
is	O
easy	O
to	O
use	O
and	O
no	O
registration/deregistration/invocation	O
code	O
need	O
to	O
be	O
written	O
,	O
because	O
Qt	B-Language
's	O
metaobject	O
compiler	O
(	O
MOC	O
)	O
automatically	O
generates	O
the	O
needed	O
infrastructure	O
.	O
</s>
<s>
A	O
spreadsheet	O
programs	O
update	O
system	O
could	O
be	O
implemented	O
using	O
signals	B-Language
and	I-Language
slots	I-Language
such	O
that	O
when	O
a	O
cell	O
is	O
changed	O
,	O
its	O
dependent	O
cells	O
are	O
notified/updated	O
.	O
</s>
<s>
There	O
are	O
some	O
implementations	O
of	O
signal/slot	O
systems	O
based	O
on	O
C++	B-Language
templates	O
,	O
which	O
do	O
n't	O
require	O
the	O
extra	O
metaobject	O
compiler	O
,	O
as	O
used	O
by	O
Qt	B-Language
,	O
such	O
as	O
libsigc++	B-Language
,	O
,	O
,	O
,	O
,	O
,	O
,	O
,	O
,	O
,	O
and	O
.	O
</s>
<s>
Common	B-Language
Language	I-Language
Infrastructure	I-Language
(	O
CLI	O
)	O
languages	O
such	O
as	O
C#	B-Application
also	O
supports	O
a	O
similar	O
construct	O
although	O
with	O
a	O
different	O
terminology	O
and	O
syntax	O
:	O
events	O
play	O
the	O
role	O
of	O
signals	O
,	O
and	O
delegates	O
are	O
the	O
slots	O
.	O
</s>
<s>
Another	O
implementation	O
of	O
signals	O
exists	O
for	O
,	O
inspired	O
by	O
C#	B-Application
events	O
and	O
signals/slots	O
in	O
Qt	B-Language
.	O
</s>
<s>
Additionally	O
,	O
a	O
delegate	O
can	O
be	O
a	O
local	O
variable	O
,	O
much	O
like	O
a	O
function	B-Language
pointer	I-Language
,	O
while	O
a	O
slot	O
in	O
Qt	B-Language
must	O
be	O
a	O
class	O
member	O
declared	O
as	O
such	O
.	O
</s>
