doc: Adjust code layout and rendering display.

This commit is contained in:
kinoshitakenta 2024-04-30 14:56:09 +08:00
parent 637ada816f
commit d5dc22a0de
Signed by: kinoshitakenta
GPG Key ID: A811E8CA36EF425E
1 changed files with 7 additions and 9 deletions

View File

@ -8,9 +8,7 @@ Current implementation require you to define(override) all the event specific di
>
> However, it seems dynamic reflection is necessary for implementation, but C++ have no this feature therefore impossible to achieve.
## basic usage
```c++
```cpp
#include <event_transformer.h>
#include <so_5/all.hpp>
@ -18,8 +16,10 @@ struct AEvent
{
double speed; // parameter of event
};
struct BEvent
{};
/**
* @brief
* as an interface for fake module process
@ -37,8 +37,7 @@ class So5_fake_module_process_ev : virtual public Fake_module_process_ev
so_5::mbox_t target;
public:
So5_fake_module_process_ev(so_5::mbox_t target_)
: target(target_)
So5_fake_module_process_ev(so_5::mbox_t target_) : target(target_)
{
}
@ -55,8 +54,7 @@ public:
}
};
void
fake_module_process(Fake_module_process_ev* evt_li_ptr)
void fake_module_process(Fake_module_process_ev* evt_li_ptr)
{
// ...
dispatch(evt_li_ptr, a_ev);