|
@@ -1386,344 +1386,6 @@ AZ_POP_DISABLE_WARNING
|
|
|
|
|
|
namespace Internal
|
|
|
{
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
- // NonIdHandler
|
|
|
-
|
|
|
- template<typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>::NonIdHandler()
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>::NonIdHandler(const NonIdHandler& rhs)
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- *this = rhs;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>& NonIdHandler<Interface, Traits, ContainerType>::operator=(const NonIdHandler& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- if (rhs.BusIsConnected())
|
|
|
- {
|
|
|
- BusConnect();
|
|
|
- }
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>::NonIdHandler(NonIdHandler&& rhs)
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- *this = AZStd::move(rhs);
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>& NonIdHandler<Interface, Traits, ContainerType>::operator=(NonIdHandler&& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- if (rhs.BusIsConnected())
|
|
|
- {
|
|
|
- rhs.BusDisconnect();
|
|
|
- BusConnect();
|
|
|
- }
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- NonIdHandler<Interface, Traits, ContainerType>::~NonIdHandler()
|
|
|
- {
|
|
|
- AZ_PUSH_DISABLE_WARNING(4127, "-Wunknown-warning-option") // conditional expression is constant (for Traits::LocklessDispatch in asserts)
|
|
|
- AZ_Assert((!AZStd::is_polymorphic<typename BusType::InterfaceType>::value || AZStd::is_same<typename BusType::MutexType, AZ::NullMutex>::value || !BusIsConnected()), "EBus handlers must be disconnected prior to destruction on multi-threaded buses with virtual functions");
|
|
|
- AZ_POP_DISABLE_WARNING
|
|
|
-
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- }
|
|
|
- EBUS_ASSERT(!BusIsConnected(), "Internal error: Bus was not properly disconnected!");
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void NonIdHandler<Interface, Traits, ContainerType>::BusConnect()
|
|
|
- {
|
|
|
- typename BusType::Context& context = BusType::GetOrCreateContext();
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context.m_contextMutex);
|
|
|
- if (!BusIsConnected())
|
|
|
- {
|
|
|
- typename Traits::BusIdType id;
|
|
|
- m_node = this;
|
|
|
- BusType::ConnectInternal(context, m_node, contextLock, id);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void NonIdHandler<Interface, Traits, ContainerType>::BusDisconnect()
|
|
|
- {
|
|
|
- if (typename BusType::Context* context = BusType::GetContext())
|
|
|
- {
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context->m_contextMutex);
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- BusType::DisconnectInternal(*context, m_node);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- bool NonIdHandler<Interface, Traits, ContainerType>::BusIsConnected() const
|
|
|
- {
|
|
|
- return static_cast<Interface*>(m_node) != nullptr;
|
|
|
- }
|
|
|
-
|
|
|
- // End of NonIdHandler
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
-
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
- // IdHandler
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>::IdHandler()
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>::IdHandler(const IdHandler& rhs)
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- *this = rhs;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>& IdHandler<Interface, Traits, ContainerType>::operator=(const IdHandler& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- if (rhs.BusIsConnected())
|
|
|
- {
|
|
|
- BusConnect(rhs.m_node.GetBusId());
|
|
|
- }
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>::IdHandler(IdHandler&& rhs)
|
|
|
- : m_node(nullptr)
|
|
|
- {
|
|
|
- *this = AZStd::move(rhs);
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>& IdHandler<Interface, Traits, ContainerType>::operator=(IdHandler&& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- if (rhs.BusIsConnected())
|
|
|
- {
|
|
|
- IdType id = rhs.m_node.GetBusId();
|
|
|
- rhs.BusDisconnect(id);
|
|
|
- BusConnect(id);
|
|
|
- }
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- IdHandler<Interface, Traits, ContainerType>::~IdHandler()
|
|
|
- {
|
|
|
- AZ_PUSH_DISABLE_WARNING(4127, "-Wunknown-warning-option") // conditional expression is constant (for Traits::LocklessDispatch in asserts)
|
|
|
- AZ_Assert((!AZStd::is_polymorphic<typename BusType::InterfaceType>::value || AZStd::is_same_v<typename BusType::MutexType, AZ::NullMutex> || !BusIsConnected()), "EBus handlers must be disconnected prior to destruction on multi-threaded buses with virtual functions");
|
|
|
- AZ_POP_DISABLE_WARNING
|
|
|
-
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- }
|
|
|
- EBUS_ASSERT(!BusIsConnected(), "Internal error: Bus was not properly disconnected!");
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void IdHandler<Interface, Traits, ContainerType>::BusConnect(const IdType& id)
|
|
|
- {
|
|
|
- typename BusType::Context& context = BusType::GetOrCreateContext();
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context.m_contextMutex);
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- // Connecting on the BusId that is already connected is a no-op
|
|
|
- if (m_node.GetBusId() == id)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- AZ_Assert(false, "Connecting to a different id on this bus without disconnecting first! Please ensure you call BusDisconnect before calling BusConnect again, or if multiple connections are desired you must use a MultiHandler instead.");
|
|
|
- BusType::DisconnectInternal(context, m_node);
|
|
|
- }
|
|
|
-
|
|
|
- m_node = this;
|
|
|
- BusType::ConnectInternal(context, m_node, contextLock, id);
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void IdHandler<Interface, Traits, ContainerType>::BusDisconnect(const IdType& id)
|
|
|
- {
|
|
|
- if (typename BusType::Context* context = BusType::GetContext())
|
|
|
- {
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context->m_contextMutex);
|
|
|
- if (BusIsConnectedId(id))
|
|
|
- {
|
|
|
- BusType::DisconnectInternal(*context, m_node);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void IdHandler<Interface, Traits, ContainerType>::BusDisconnect()
|
|
|
- {
|
|
|
- if (typename BusType::Context* context = BusType::GetContext())
|
|
|
- {
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context->m_contextMutex);
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- BusType::DisconnectInternal(*context, m_node);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- bool IdHandler<Interface, Traits, ContainerType>::BusIsConnectedId(const IdType& id) const
|
|
|
- {
|
|
|
- return BusIsConnected() && m_node.GetBusId() == id;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- bool IdHandler<Interface, Traits, ContainerType>::BusIsConnected() const
|
|
|
- {
|
|
|
- return m_node.m_holder != nullptr;
|
|
|
- }
|
|
|
-
|
|
|
- // End of IdHandler
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
-
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
- // MultiHandler
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>::MultiHandler() = default;
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>::MultiHandler(const MultiHandler& rhs)
|
|
|
- {
|
|
|
- *this = rhs;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>& MultiHandler<Interface, Traits, ContainerType>::operator=(const MultiHandler& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- for (const auto& nodePair : rhs.m_handlerNodes)
|
|
|
- {
|
|
|
- BusConnect(nodePair.first);
|
|
|
- }
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>::MultiHandler(MultiHandler&& rhs)
|
|
|
- {
|
|
|
- *this = AZStd::move(rhs);
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>& MultiHandler<Interface, Traits, ContainerType>::operator=(MultiHandler&& rhs)
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- for (const auto& nodePair : rhs.m_handlerNodes)
|
|
|
- {
|
|
|
- BusConnect(nodePair.first);
|
|
|
- }
|
|
|
- rhs.BusDisconnect();
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- MultiHandler<Interface, Traits, ContainerType>::~MultiHandler()
|
|
|
- {
|
|
|
- AZ_PUSH_DISABLE_WARNING(4127, "-Wunknown-warning-option") // conditional expression is constant (for Traits::LocklessDispatch in asserts)
|
|
|
- AZ_Assert((!AZStd::is_polymorphic<typename BusType::InterfaceType>::value || AZStd::is_same<typename BusType::MutexType, AZ::NullMutex>::value || !BusIsConnected()), "EBus handlers must be disconnected prior to destruction on multi-threaded buses with virtual functions");
|
|
|
- AZ_POP_DISABLE_WARNING
|
|
|
-
|
|
|
- if (BusIsConnected())
|
|
|
- {
|
|
|
- BusDisconnect();
|
|
|
- }
|
|
|
- EBUS_ASSERT(!BusIsConnected(), "Internal error: Bus was not properly disconnected!");
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void MultiHandler<Interface, Traits, ContainerType>::BusConnect(const IdType& id)
|
|
|
- {
|
|
|
- typename BusType::Context& context = BusType::GetOrCreateContext();
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context.m_contextMutex);
|
|
|
- if (m_handlerNodes.find(id) == m_handlerNodes.end())
|
|
|
- {
|
|
|
- void* handlerNodeAddr = m_handlerNodes.get_allocator().allocate(sizeof(HandlerNode), AZStd::alignment_of<HandlerNode>::value);
|
|
|
- auto handlerNode = new(handlerNodeAddr) HandlerNode(this);
|
|
|
- m_handlerNodes.emplace(id, AZStd::move(handlerNode));
|
|
|
- BusType::ConnectInternal(context, *handlerNode, contextLock, id);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void MultiHandler<Interface, Traits, ContainerType>::BusDisconnect(const IdType& id)
|
|
|
- {
|
|
|
- if (typename BusType::Context* context = BusType::GetContext())
|
|
|
- {
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context->m_contextMutex);
|
|
|
- auto nodeIt = m_handlerNodes.find(id);
|
|
|
- if (nodeIt != m_handlerNodes.end())
|
|
|
- {
|
|
|
- HandlerNode* handlerNode = nodeIt->second;
|
|
|
- BusType::DisconnectInternal(*context, *handlerNode);
|
|
|
- m_handlerNodes.erase(nodeIt);
|
|
|
- handlerNode->~HandlerNode();
|
|
|
- m_handlerNodes.get_allocator().deallocate(handlerNode, sizeof(HandlerNode), alignof(HandlerNode));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- void MultiHandler<Interface, Traits, ContainerType>::BusDisconnect()
|
|
|
- {
|
|
|
- decltype(m_handlerNodes) handlerNodesToDisconnect;
|
|
|
- if (typename BusType::Context* context = BusType::GetContext())
|
|
|
- {
|
|
|
- typename BusType::Context::ConnectLockGuard contextLock(context->m_contextMutex);
|
|
|
- handlerNodesToDisconnect = AZStd::move(m_handlerNodes);
|
|
|
-
|
|
|
- for (const auto& nodePair : handlerNodesToDisconnect)
|
|
|
- {
|
|
|
- BusType::DisconnectInternal(*context, *nodePair.second);
|
|
|
-
|
|
|
- nodePair.second->~HandlerNode();
|
|
|
- handlerNodesToDisconnect.get_allocator().deallocate(nodePair.second, sizeof(HandlerNode), AZStd::alignment_of<HandlerNode>::value);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- bool MultiHandler<Interface, Traits, ContainerType>::BusIsConnectedId(const IdType& id) const
|
|
|
- {
|
|
|
- return m_handlerNodes.end() != m_handlerNodes.find(id);
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Interface, typename Traits, typename ContainerType>
|
|
|
- bool MultiHandler<Interface, Traits, ContainerType>::BusIsConnected() const
|
|
|
- {
|
|
|
- return !m_handlerNodes.empty();
|
|
|
- }
|
|
|
-
|
|
|
- // End of MultiHandler
|
|
|
- //////////////////////////////////////////////////////////////////////////
|
|
|
-
|
|
|
template <class EBus, class TargetEBus, class BusIdType>
|
|
|
struct EBusRouterQueueEventForwarder
|
|
|
{
|
|
@@ -2247,20 +1909,84 @@ namespace AZ \
|
|
|
template class EBus<a, a>; \
|
|
|
}
|
|
|
|
|
|
+#if defined(AZ_MONOLITHIC_BUILD)
|
|
|
+
|
|
|
+//! Declares an EBus class template, which uses EBusAddressPolicy::Single and is instantiated in a shared library, as extern using only the
|
|
|
+//! interface argument for both the EBus Interface and BusTraits template parameters
|
|
|
+#define AZ_DECLARE_EBUS_SINGLE_ADDRESS(_API, a) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ extern template class EBus<a, a>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
+#define AZ_INSTANTIATE_EBUS_SINGLE_ADDRESS(_API, a) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ template class EBus<a, a>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Declares an EBus class template, which uses an address policy different from EBusAddressPolicy::Single and is instantiated in a shared
|
|
|
+//! library, as extern using only the interface argument for both the EBus Interface and BusTraits template parameters
|
|
|
+#define AZ_DECLARE_EBUS_MULTI_ADDRESS(_API, a) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ extern template class EBus<a, a>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
+#define AZ_INSTANTIATE_EBUS_MULTI_ADDRESS(_API, a) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ template class EBus<a, a>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Declares an EBus class template, which uses EBusAddressPolicy::Single and is instantiated in a shared library, as extern with both the
|
|
|
+//! interface and bus traits arguments
|
|
|
+#define AZ_DECLARE_EBUS_SINGLE_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ extern template class EBus<a, b>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
+#define AZ_INSTANTIATE_EBUS_SINGLE_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ template class EBus<a, b>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Declares an EBus class template, which uses an address policy different from EBusAddressPolicy::Single and is instantiated in a shared
|
|
|
+//! library, as extern with both the interface and bus traits arguments
|
|
|
+#define AZ_DECLARE_EBUS_MULTI_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ extern template class EBus<a, b>; \
|
|
|
+}
|
|
|
+
|
|
|
+//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
+#define AZ_INSTANTIATE_EBUS_MULTI_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
+namespace AZ \
|
|
|
+{ \
|
|
|
+ template class EBus<a, b>; \
|
|
|
+}
|
|
|
+
|
|
|
+#else
|
|
|
+
|
|
|
//! Declares an EBus class template, which uses EBusAddressPolicy::Single and is instantiated in a shared library, as extern using only the
|
|
|
//! interface argument for both the EBus Interface and BusTraits template parameters
|
|
|
-#define DECLARE_EBUS_EXTERN_DLL_SINGLE_ADDRESS(a) \
|
|
|
+#define AZ_DECLARE_EBUS_SINGLE_ADDRESS(_API, a) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
- extern template class AZCORE_API_EXTERN EBus<a, a>; \
|
|
|
+ extern template class _API EBus<a, a>; \
|
|
|
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::NonIdHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
- extern template struct AZCORE_API_EXTERN Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, a>, true>; \
|
|
|
+ extern template class _API Internal::NonIdHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
+ extern template struct _API Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, a>, true>; \
|
|
|
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
}
|
|
|
|
|
|
//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
-#define DECLARE_EBUS_INSTANTIATION_DLL_SINGLE_ADDRESS(a) \
|
|
|
+#define AZ_INSTANTIATE_EBUS_SINGLE_ADDRESS(_API, a) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
template class AZ_DLL_EXPORT EBus<a, a>; \
|
|
@@ -2272,19 +1998,19 @@ namespace AZ \
|
|
|
|
|
|
//! Declares an EBus class template, which uses an address policy different from EBusAddressPolicy::Single and is instantiated in a shared
|
|
|
//! library, as extern using only the interface argument for both the EBus Interface and BusTraits template parameters
|
|
|
-#define DECLARE_EBUS_EXTERN_DLL_MULTI_ADDRESS(a) \
|
|
|
+#define AZ_DECLARE_EBUS_MULTI_ADDRESS(_API, a) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
- extern template class AZCORE_API_EXTERN EBus<a, a>; \
|
|
|
+ extern template class _API EBus<a, a>; \
|
|
|
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::IdHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::MultiHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
- extern template struct AZCORE_API_EXTERN Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, a>, true>; \
|
|
|
+ extern template class _API Internal::IdHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
+ extern template class _API Internal::MultiHandler<a, a, EBus<a, a>::BusesContainer>; \
|
|
|
+ extern template struct _API Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, a>, true>; \
|
|
|
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
}
|
|
|
|
|
|
//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
-#define DECLARE_EBUS_INSTANTIATION_DLL_MULTI_ADDRESS(a) \
|
|
|
+#define AZ_INSTANTIATE_EBUS_MULTI_ADDRESS(_API, a) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
template class AZ_DLL_EXPORT EBus<a, a>; \
|
|
@@ -2297,18 +2023,18 @@ namespace AZ \
|
|
|
|
|
|
//! Declares an EBus class template, which uses EBusAddressPolicy::Single and is instantiated in a shared library, as extern with both the
|
|
|
//! interface and bus traits arguments
|
|
|
-#define DECLARE_EBUS_EXTERN_DLL_SINGLE_ADDRESS_WITH_TRAITS(a, b) \
|
|
|
+#define AZ_DECLARE_EBUS_SINGLE_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
- extern template class AZCORE_API_EXTERN EBus<a, b>; \
|
|
|
+ extern template class _API EBus<a, b>; \
|
|
|
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::NonIdHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
- extern template struct AZCORE_API_EXTERN Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, b>, true>; \
|
|
|
+ extern template class _API Internal::NonIdHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
+ extern template struct _API Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, b>, true>; \
|
|
|
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
}
|
|
|
|
|
|
//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
-#define DECLARE_EBUS_INSTANTIATION_DLL_SINGLE_ADDRESS_WITH_TRAITS(a, b) \
|
|
|
+#define AZ_INSTANTIATE_EBUS_SINGLE_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
template class AZ_DLL_EXPORT EBus<a, b>; \
|
|
@@ -2320,19 +2046,19 @@ namespace AZ \
|
|
|
|
|
|
//! Declares an EBus class template, which uses an address policy different from EBusAddressPolicy::Single and is instantiated in a shared
|
|
|
//! library, as extern with both the interface and bus traits arguments
|
|
|
-#define DECLARE_EBUS_EXTERN_DLL_MULTI_ADDRESS_WITH_TRAITS(a, b) \
|
|
|
+#define AZ_DECLARE_EBUS_MULTI_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
- extern template class AZCORE_API_EXTERN EBus<a, b>; \
|
|
|
+ extern template class _API EBus<a, b>; \
|
|
|
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::IdHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
- extern template class AZCORE_API_EXTERN Internal::MultiHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
- extern template struct AZCORE_API_EXTERN Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, b>, true>; \
|
|
|
+ extern template class _API Internal::IdHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
+ extern template class _API Internal::MultiHandler<a, b, EBus<a, b>::BusesContainer>; \
|
|
|
+ extern template struct _API Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, b>, true>; \
|
|
|
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
}
|
|
|
|
|
|
//! Explicitly instantiates an EBus which was declared with the function directly above
|
|
|
-#define DECLARE_EBUS_INSTANTIATION_DLL_MULTI_ADDRESS_WITH_TRAITS(a, b) \
|
|
|
+#define AZ_INSTANTIATE_EBUS_MULTI_ADDRESS_WITH_TRAITS(_API, a, b) \
|
|
|
namespace AZ \
|
|
|
{ \
|
|
|
template class AZ_DLL_EXPORT EBus<a, b>; \
|
|
@@ -2342,3 +2068,5 @@ namespace AZ \
|
|
|
template struct AZ_DLL_EXPORT Internal::EBusCallstackStorage<Internal::CallstackEntryBase<a, b>, true>; \
|
|
|
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING \
|
|
|
}
|
|
|
+
|
|
|
+#endif //defined(AZ_MONOLITHIC_BUILD)
|