DynamicMessageType is a handle to an existing message type. More...
#include <kanzi/core/message/dynamic_message_type.hpp>
Public Member Functions | |
DynamicMessageType (AbstractMessageType abstractMessageType) | |
Constructor. | |
DynamicMessageType (string_view name) | |
Constructor. | |
~DynamicMessageType () | |
Destructor. | |
Public Member Functions inherited from kanzi::MessageType< TArgumentsClass > | |
const AbstractMessageTypeDescriptor * | get () const |
Gets the AbstractMessageTypeDescriptor of the message type. | |
PropertyTypeEditorInfoSharedPtr | getEditorInfo () const |
Gets the editor information for the message type. | |
string | getName () const |
Gets the fully qualified name of the message type in the form "Class.MessageType". | |
MessageRouting | getRouting () const |
Gets the message routing of the message type. | |
MessageType (const MessageType &)=delete | |
Deleted copy constructor. | |
MessageType (FixedString name) | |
Constructor. | |
MessageType (FixedString name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. | |
MessageType (FixedString name, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. | |
MessageType (MetadataGeneratedName name) | |
Constructor. | |
MessageType (MetadataGeneratedName name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. | |
MessageType (MetadataGeneratedName name, PropertyTypeEditorInfoSharedPtr editorInfo) | |
Constructor. | |
operator AbstractMessageType () const | |
Conversion operator to AbstractMessageType. | |
MessageType & | operator= (const MessageType &)=delete |
Deleted assignment. | |
~MessageType () | |
Destructor. | |
Additional Inherited Members | |
Public Types inherited from kanzi::MessageType< TArgumentsClass > | |
using | ArgumentsType |
Alias for associated message arguments class. | |
using | FunctionType |
Alias for compatible handler functions. | |
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. | |
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. | |
Protected Member Functions inherited from kanzi::MessageType< TArgumentsClass > | |
MessageType ()=default | |
Constructor. | |
Protected Attributes inherited from kanzi::MessageType< TArgumentsClass > | |
const AbstractMessageTypeDescriptor * | m_descriptor |
Describes the name, routing, and message arguments metaclass of the message type. | |
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.