mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Changed etl::message_packet to not require virtual messages
This commit is contained in:
parent
6c7cb5ac18
commit
baf12b1fcb
1
.gitignore
vendored
1
.gitignore
vendored
@ -396,3 +396,4 @@ test/etl_error_handler/assert_function/build-make
|
||||
test/syntax_check/bgcc
|
||||
test/syntax_check/bclang
|
||||
test/vs2022/Debug Clang C++20
|
||||
test/vs2022/Debug MSVC C++20 - Forve C++03 - No virtual messages
|
||||
|
||||
@ -53,8 +53,6 @@ SOFTWARE.
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
|
||||
#include "message.h"
|
||||
#include "error_handler.h"
|
||||
#include "static_assert.h"
|
||||
@ -286,11 +284,39 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
#if !ETL_HAS_VIRTUAL_MESSAGES
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
(delete_message_type<TMessageTypes>(pmsg) || ...);
|
||||
}
|
||||
|
||||
//********************************************
|
||||
template <typename TType>
|
||||
bool delete_message_type(etl::imessage* pmsg)
|
||||
{
|
||||
if (TType::ID == pmsg->get_message_id())
|
||||
{
|
||||
TType* p = static_cast<TType*>(pmsg);
|
||||
p->~TType();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -584,11 +610,40 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
case T12::ID: static_cast<const T12*>(pmsg)->~T12(); break;
|
||||
case T13::ID: static_cast<const T13*>(pmsg)->~T13(); break;
|
||||
case T14::ID: static_cast<const T14*>(pmsg)->~T14(); break;
|
||||
case T15::ID: static_cast<const T15*>(pmsg)->~T15(); break;
|
||||
case T16::ID: static_cast<const T16*>(pmsg)->~T16(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -879,11 +934,39 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
case T12::ID: static_cast<const T12*>(pmsg)->~T12(); break;
|
||||
case T13::ID: static_cast<const T13*>(pmsg)->~T13(); break;
|
||||
case T14::ID: static_cast<const T14*>(pmsg)->~T14(); break;
|
||||
case T15::ID: static_cast<const T15*>(pmsg)->~T15(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -1172,11 +1255,38 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
case T12::ID: static_cast<const T12*>(pmsg)->~T12(); break;
|
||||
case T13::ID: static_cast<const T13*>(pmsg)->~T13(); break;
|
||||
case T14::ID: static_cast<const T14*>(pmsg)->~T14(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -1463,11 +1573,37 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
case T12::ID: static_cast<const T12*>(pmsg)->~T12(); break;
|
||||
case T13::ID: static_cast<const T13*>(pmsg)->~T13(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -1748,11 +1884,36 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
case T12::ID: static_cast<const T12*>(pmsg)->~T12(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -2031,11 +2192,35 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
case T11::ID: static_cast<const T11*>(pmsg)->~T11(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -2312,11 +2497,34 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
case T10::ID: static_cast<const T10*>(pmsg)->~T10(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -2591,11 +2799,33 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
case T9::ID: static_cast<const T9*>(pmsg)->~T9(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -2864,11 +3094,32 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
case T8::ID: static_cast<const T8*>(pmsg)->~T8(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -3135,11 +3386,31 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
case T7::ID: static_cast<const T7*>(pmsg)->~T7(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -3404,11 +3675,30 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
case T6::ID: static_cast<const T6*>(pmsg)->~T6(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -3671,11 +3961,29 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
case T5::ID: static_cast<const T5*>(pmsg)->~T5(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -3932,11 +4240,28 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
case T4::ID: static_cast<const T4*>(pmsg)->~T4(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -4191,11 +4516,27 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
case T3::ID: static_cast<const T3*>(pmsg)->~T3(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -4448,11 +4789,26 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
case T2::ID: static_cast<const T2*>(pmsg)->~T2(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -4703,11 +5059,25 @@ namespace etl
|
||||
{
|
||||
etl::imessage* pmsg = static_cast<etl::imessage*>(data);
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
pmsg->~imessage();
|
||||
#else
|
||||
delete_message(pmsg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//********************************************
|
||||
void delete_message(etl::imessage* pmsg)
|
||||
{
|
||||
switch (pmsg->get_message_id())
|
||||
{
|
||||
case T1::ID: static_cast<const T1*>(pmsg)->~T1(); break;
|
||||
default: ETL_ASSERT(false, ETL_ERROR(unhandled_message_exception)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************
|
||||
void add_new_message(const etl::imessage& msg)
|
||||
{
|
||||
@ -4741,8 +5111,4 @@ namespace etl
|
||||
};
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#error "etl::message_packet is not compatible with non-virtual etl::imessage"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -54,9 +54,7 @@ SOFTWARE.
|
||||
#include "platform.h"
|
||||
#include "message.h"
|
||||
#include "shared_message.h"
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
#include "message_packet.h"
|
||||
#endif
|
||||
#include "message_packet.h"
|
||||
#include "message_types.h"
|
||||
#include "alignment.h"
|
||||
#include "error_handler.h"
|
||||
@ -412,9 +410,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<TMessageTypes...> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router()
|
||||
@ -562,9 +558,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -709,9 +703,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -856,9 +848,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1002,9 +992,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1146,9 +1134,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1289,9 +1275,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1431,9 +1415,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1572,9 +1554,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8, T9> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1711,9 +1691,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7, T8> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1849,9 +1827,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6, T7> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -1985,9 +1961,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5, T6> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -2120,9 +2094,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4, T5> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -2253,9 +2225,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3, T4> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -2385,9 +2355,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2, T3> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -2516,9 +2484,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet<T1, T2> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
@ -2646,9 +2612,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
typedef etl::message_packet< T1> message_packet;
|
||||
#endif
|
||||
|
||||
//**********************************************
|
||||
message_router(etl::message_router_id_t id_)
|
||||
|
||||
@ -30,8 +30,6 @@ SOFTWARE.
|
||||
|
||||
#include "etl/platform.h"
|
||||
|
||||
#if ETL_HAS_VIRTUAL_MESSAGES
|
||||
|
||||
#include "etl/message_packet.h"
|
||||
|
||||
#include <string>
|
||||
@ -481,5 +479,3 @@ namespace
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -19,6 +19,8 @@ Global
|
||||
Debug MSVC C++17|x64 = Debug MSVC C++17|x64
|
||||
Debug MSVC C++20 - Force C++03|Win32 = Debug MSVC C++20 - Force C++03|Win32
|
||||
Debug MSVC C++20 - Force C++03|x64 = Debug MSVC C++20 - Force C++03|x64
|
||||
Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32 = Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32
|
||||
Debug MSVC C++20 - Forve C++03 - No virtual messages|x64 = Debug MSVC C++20 - Forve C++03 - No virtual messages|x64
|
||||
Debug MSVC C++20 - No STL|Win32 = Debug MSVC C++20 - No STL|Win32
|
||||
Debug MSVC C++20 - No STL|x64 = Debug MSVC C++20 - No STL|x64
|
||||
Debug MSVC C++20 - No virtual messages|Win32 = Debug MSVC C++20 - No virtual messages|Win32
|
||||
@ -57,6 +59,10 @@ Global
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Force C++03|Win32.Build.0 = Debug MSVC C++20 - Force C++03|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Force C++03|x64.ActiveCfg = Debug MSVC C++20 - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Force C++03|x64.Build.0 = Debug MSVC C++20 - Force C++03|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32.ActiveCfg = Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32.Build.0 = Debug MSVC C++20 - Forve C++03 - No virtual messages|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Forve C++03 - No virtual messages|x64.ActiveCfg = Debug MSVC C++20 - Forve C++03 - No virtual messages|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - Forve C++03 - No virtual messages|x64.Build.0 = Debug MSVC C++20 - Forve C++03 - No virtual messages|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|Win32.ActiveCfg = Debug MSVC C++20 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|Win32.Build.0 = Debug MSVC C++20 - No STL|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++20 - No STL|x64.ActiveCfg = Debug MSVC C++20 - No STL|x64
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user