Compare commits
No commits in common. "dddcb83f255d6cc2737683b9a2a62cfc37c0b63f" and "637ada816fc9fbbdd424b8230d0bca1261ffc073" have entirely different histories.
dddcb83f25
...
637ada816f
12
README.md
12
README.md
|
@ -8,7 +8,9 @@ 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.
|
> However, it seems dynamic reflection is necessary for implementation, but C++ have no this feature therefore impossible to achieve.
|
||||||
|
|
||||||
```cpp
|
## basic usage
|
||||||
|
|
||||||
|
```c++
|
||||||
#include <event_transformer.h>
|
#include <event_transformer.h>
|
||||||
#include <so_5/all.hpp>
|
#include <so_5/all.hpp>
|
||||||
|
|
||||||
|
@ -16,10 +18,8 @@ struct AEvent
|
||||||
{
|
{
|
||||||
double speed; // parameter of event
|
double speed; // parameter of event
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BEvent
|
struct BEvent
|
||||||
{};
|
{};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
* as an interface for fake module process
|
* as an interface for fake module process
|
||||||
|
@ -37,7 +37,8 @@ class So5_fake_module_process_ev : virtual public Fake_module_process_ev
|
||||||
so_5::mbox_t target;
|
so_5::mbox_t target;
|
||||||
|
|
||||||
public:
|
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_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +55,8 @@ 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);
|
dispatch(evt_li_ptr, a_ev);
|
||||||
|
|
Loading…
Reference in New Issue