@@ -29,7 +29,7 @@ You can find the complete implementation of EventHandler in `src/shared/events/E
### Example
This example shows how to define a very simple custom EventHandler.
#### MyEventHandler.h
##### MyEventHandler.h
The first thing we need to do is to import the required modules and to define a set of events. For more details you can look at the [Events](Events) page.
Here we define three possible events: `EV_1`, `EV_2` and `EV_3`.
```cpp
...
...
@@ -78,7 +78,7 @@ private:
};
```
#### test-myeventhandler.cpp
##### test-myeventhandler.cpp
In order to test that our class works we can create a MyEventHandler object and start it.
We can then post some events and see what the output is.
```cpp
...
...
@@ -112,7 +112,7 @@ int main()
return0;
}
```
#### Output
##### Output
Remember to add the `test-myeventhandler.cpp` to `sbs.conf` and to specify all the needed includes.
After you run the example you should see the following output: