siplasplas
foobar.hpp
1 #ifndef SIPLASPLAS_EXAMPLES_SIGNALS_FOOBAR_HPP
2 #define SIPLASPLAS_EXAMPLES_SIGNALS_FOOBAR_HPP
3 
4 #include <siplasplas/signals/emitter.hpp>
5 #include <iostream>
6 
7 class Foo : public cpp::SignalEmitter
8 {
9 public:
10  void signal(int i){}
11  void signal2(int integer){}
12 
13  void slot(int integer)
14  {
15  std::cout << CTTI_TYPE_ID_PRETTY_FUNCTION << ": " << integer << " (this=@" << this << ")\n";
16  }
17 };
18 
19 class Bar : public cpp::SignalEmitter
20 {
21 public:
22  void slot(int i)
23  {
24  std::cout << "Hello from Bar! (this=@" << this << ", i=" << i << ")\n";
25  }
26 };
27 
28 #include <reflection/examples/signals/foobar.hpp>
29 
30 #endif // SIPLASPLAS_EXAMPLES_SIGNALS_FOOBAR_HPP
Definition: foobar.hpp:7
Class that can send and receive signals from other emitters.
Definition: emitter.hpp:64
Definition: foobar.hpp:19