FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::MessageBroadcaster Class Reference

Description

#include <FormItMessaging.h>

Static Public Member Functions

template<typename T >
static void Broadcast (T const &message, typename T::Payload const &payload)
 Sends the given message to all Listeners that have subscribed to it. More...
 
template<typename T >
static void Broadcast (T const &message, typename T::Payload &&payload)
 
static FORMIT_CORE_EXPORT void Broadcast (MessageVoidStruct const &message)
 
static FORMIT_CORE_EXPORT void SubscribeToMessage (MessageListener *listener, MessageStruct const &message)
 Makes sure that all future broadcasts of message do/don't go to the given listener. More...
 
static FORMIT_CORE_EXPORT MessageStruct const * SubscribeToMessage (MessageListener *listener, 1::string const &message)
 
static FORMIT_CORE_EXPORT void UnsubscribeFromMessage (MessageListener *listener, MessageStruct const &message)
 
static FORMIT_CORE_EXPORT MessageStruct const * UnsubscribeFromMessage (MessageListener *listener, 1::string const &message)
 
static FORMIT_CORE_EXPORT void SubscribeToAllMessages (MessageListener *listener)
 SubscribeToAllMessages will broadcast all the messages to the given listener. More...
 
static FORMIT_CORE_EXPORT void UnsubscribeFromAll (MessageListener *listener)
 
static FORMIT_CORE_EXPORT void RegisterScriptMessage (1::string const &, const FormIt::MessageStruct *)
 Register the message for scripting. More...
 
static::vector< 1::string > GetScriptMessages ()
 Get the list of messages. More...
 
static void construct ()
 
static void destroy ()
 

Member Function Documentation

template<typename T >
static void FormIt::MessageBroadcaster::Broadcast ( T const &  message,
typename T::Payload const &  payload 
)
inlinestatic

Sends the given message to all Listeners that have subscribed to it.

template<typename T >
static void FormIt::MessageBroadcaster::Broadcast ( T const &  message,
typename T::Payload &&  payload 
)
inlinestatic
static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::Broadcast ( MessageVoidStruct const &  message)
static
static void FormIt::MessageBroadcaster::construct ( )
static
static void FormIt::MessageBroadcaster::destroy ( )
static
static ::vector<1::string> FormIt::MessageBroadcaster::GetScriptMessages ( )
static

Get the list of messages.

static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::RegisterScriptMessage ( 1::string const &  ,
const FormIt::MessageStruct  
)
static

Register the message for scripting.

static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::SubscribeToAllMessages ( MessageListener listener)
static

SubscribeToAllMessages will broadcast all the messages to the given listener.

For example, this is used to pipe all the messages into the Web app for handling in native JS code.

static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::SubscribeToMessage ( MessageListener listener,
MessageStruct const &  message 
)
static

Makes sure that all future broadcasts of message do/don't go to the given listener.

static FORMIT_CORE_EXPORT MessageStruct const* FormIt::MessageBroadcaster::SubscribeToMessage ( MessageListener listener,
1::string const &  message 
)
static
static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::UnsubscribeFromAll ( MessageListener listener)
static
static FORMIT_CORE_EXPORT void FormIt::MessageBroadcaster::UnsubscribeFromMessage ( MessageListener listener,
MessageStruct const &  message 
)
static
static FORMIT_CORE_EXPORT MessageStruct const* FormIt::MessageBroadcaster::UnsubscribeFromMessage ( MessageListener listener,
1::string const &  message 
)
static

The documentation for this class was generated from the following file: