State machine observer in C++

Standard C++ Observer

The most basic observer is the console observer ObserverStd which logs all messages to the standard output.

Here is how to use the ObserverStd singleton class:

Qt Observer

A powerful observer is SmQtObserver which can be found in examples/qt/SmQtUtils it logs messages according to its configuratinon file. Messages can be sent to according to their level and towards the console and/or files.

Here is how to use the SmQtObserver singleton class:

Boost Observer

In case Boost is used as the underlying library, one may be interested in the SmBoostObserver class which can be found in examples/boost/Utils

The following code shows how to configure the boost log library to deliver messages to standard output and a file: