Added shared_message receive override to messge_bus

This commit is contained in:
John Wellbelove 2021-01-15 09:47:59 +00:00
parent a008ea3bfa
commit 472035d69f
3 changed files with 10 additions and 5 deletions

1
.gitignore vendored
View File

@ -284,3 +284,4 @@ examples/FunctionInterruptSimulation-Delegates/vs2019/.vs
*.db-shm
test/vs2019/.vs/etl/v16/Browse.VC.db-wal
examples/SharedMessage/.vs

View File

@ -149,11 +149,18 @@ namespace etl
//*******************************************
virtual void receive(etl::imessage_router& source,
const etl::imessage& message) ETL_OVERRIDE
const etl::imessage& message) ETL_OVERRIDE
{
receive(source, etl::imessage_router::ALL_MESSAGE_ROUTERS, message);
}
//*******************************************
virtual void receive(etl::imessage_router& source,
etl::shared_message shared_msg) ETL_OVERRIDE
{
receive(source, etl::imessage_router::ALL_MESSAGE_ROUTERS, shared_msg);
}
//********************************************
virtual void receive(etl::imessage_router& source,
etl::message_router_id_t destination_router_id,

View File

@ -33,6 +33,7 @@ SOFTWARE.
#include "platform.h"
#include "message.h"
#include "imemory_block_allocator.h"
#include "ireference_counted_message_pool.h"
#include "reference_counted_message.h"
#include "static_assert.h"
@ -45,9 +46,6 @@ SOFTWARE.
#undef ETL_FILE
#define ETL_FILE ETL_REFERENCE_COUNTER_MESSAGE_POOL_ID
#undef ETL_MAX
#define ETL_MAX(a, b) ((a) < (b) ? (b) : (a))
namespace etl
{
//***************************************************************************
@ -234,6 +232,5 @@ namespace etl
}
#undef ETL_FILE
#undef ETL_MAX
#endif