Classes | Typedefs | Functions
test_sigslot.cxx File Reference
#include <boost/signals2.hpp>
#include <iostream>
#include <memory>

Go to the source code of this file.

Classes

struct  A
 
struct  B
 
struct  MyData
 
struct  SlotA
 
struct  SigA
 

Typedefs

typedef boost::signals2::signal< int()> IntSig
 
typedef std::shared_ptr< IntSigIntSigPtr
 
typedef IntSig::slot_type IntSlot
 

Functions

void test_simple ()
 
void test_isignal ()
 
int main ()
 

Typedef Documentation

typedef boost::signals2::signal<int ()> IntSig

Definition at line 10 of file test_sigslot.cxx.

typedef std::shared_ptr<IntSig> IntSigPtr

Definition at line 11 of file test_sigslot.cxx.

typedef IntSig::slot_type IntSlot

Definition at line 12 of file test_sigslot.cxx.

Function Documentation

int main ( void  )

Definition at line 96 of file test_sigslot.cxx.

97 {
98  test_simple();
99  test_isignal();
100  return 0;
101 }
void test_isignal()
void test_simple()
void test_isignal ( )

Definition at line 84 of file test_sigslot.cxx.

85 {
86  SlotA slota;
87  SigA siga, sigaa;
88  siga.connect(slota);
89  sigaa.connect(boost::ref(siga));
90  cout << sigaa()->get() << endl;;
91  cout << sigaa()->get() << endl;;
92  cout << sigaa()->get() << endl;;
93 }
void connect(const MyData::source_slot &s)
QTextStream & endl(QTextStream &s)
void test_simple ( )

Definition at line 41 of file test_sigslot.cxx.

42 {
43  A a(42, 1.0);
44  B b(1.0);
45  b.connect(a);
46  B b2(2.0);
47  b2.connect(b);
48  B b3(3.0);
49  b3.connect(b2);
50 
51  b3();
52  b3();
53 }
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
#define A
Definition: memgrp.cpp:38
static bool * b
Definition: config.cpp:1043