DynamicMessageType is a handle to an existing message type. More...
#include <kanzi/core/message/message_type.hpp>
Public Member Functions | |
DynamicMessageType (string_view name) | |
Constructor. More... | |
DynamicMessageType (AbstractMessageType abstractMessageType) | |
Constructor. More... | |
~DynamicMessageType () | |
Destructor. More... | |
Public Member Functions inherited from kanzi::MessageType< TArgumentsClass > | |
const AbstractMessageTypeDescriptor * | get () const |
Gets the AbstractMessageTypeDescriptor of the message type. More... | |
PropertyTypeEditorInfoSharedPtr | getEditorInfo () const |
Gets the editor information for the message type. More... | |
string | getName () const |
Gets the fully qualified name of the message type in the form "Class.MessageType". More... | |
MessageRouting | getRouting () const |
Gets the message routing of the message type. More... | |
MessageType (FixedString name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. More... | |
MessageType (MetadataGeneratedName name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. More... | |
MessageType (FixedString name) | |
Constructor. More... | |
MessageType (MetadataGeneratedName name) | |
Constructor. More... | |
MessageType (FixedString name, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. More... | |
MessageType (MetadataGeneratedName name, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. More... | |
MessageType (const MessageType &)=delete | |
Deleted copy constructor. More... | |
operator AbstractMessageType () const | |
Conversion operator to AbstractMessageType. More... | |
MessageType & | operator= (const MessageType &)=delete |
Deleted assignment. More... | |
~MessageType () | |
Destructor. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::MessageType< TArgumentsClass > | |
using | ArgumentsType = TArgumentsClass |
Alias for associated message arguments class. More... | |
using | FunctionType = function< void(ArgumentsType &)> |
Alias for compatible handler functions. More... | |
Static Public Member Functions inherited from kanzi::MessageType< TArgumentsClass > | |
static const Metaclass * | getArgumentsMetaclass () |
Gets the metaclass of the message arguments associated with the message type. More... | |
static constexpr bool | hasCustomArgumentsClass () |
Returns whether the message arguments class associated with the message type is a custom message arguments class or the base MessageArguments class. More... | |
Protected Member Functions inherited from kanzi::MessageType< TArgumentsClass > | |
MessageType ()=default | |
Constructor. More... | |
Protected Attributes inherited from kanzi::MessageType< TArgumentsClass > | |
const AbstractMessageTypeDescriptor * | m_descriptor |
Describes the name, routing, and message arguments metaclass of the message type. More... | |
DynamicMessageType is a handle to an existing message type.
You can use it to add and remove a message handler or to dispatch a message of that type on a node.
You can use a DynamicMessageType to access message types when you have their message arguments and fully qualified name. When you do not have a fully qualified name or message arguments of a message type, or they are irrelevant, to access message types, use the AbstractMessageType type.
To create for an existing message type a DynamicMessageType with a fully qualified name:
To add a message handler with DynamicMessageType:
|
inlineexplicit |
Constructor.
Creates a DynamicMessageType instance that refers to the same existing message type as the given name.
name | Fully qualified name of an existing message type in the Kanzi message system. |
logic_error | if there is no message type with the given name in the Kanzi message system or the message arguments do not match the existing message type with the given name. |
|
inlineexplicit |
Constructor.
Creates a DynamicMessageType instance that refers to the same existing message type as the given AbstractMessageType instance does.
abstractMessageType | AbstractMessageType instance that refers to the existing message type in the Kanzi message system. |
logic_error | if the message arguments do not match the existing message type to which the given AbstractMessageType refers or if the given AbstractMessageType is null. |
|
inline |
Destructor.