Kanzi  3.9.6
Kanzi Engine API
kanzi::AbstractMessageTypeDescriptor Class Reference

An instance of a AbstractMessageTypeDescriptor represents a single message type in the Kanzi message system in an abstract homogeneous form. More...

#include <kanzi/core/message/abstract_message_type_descriptor.hpp>

Public Types

using ManagedDescriptor = unique_ptr< AbstractMessageTypeDescriptor >
 Alias for AbstractMessageTypeDescriptor with managed lifetime. More...
 
using MetaclassGetter = function< const Metaclass *()>
 Alias for a pointer to getter of metaclass of a message arguments class. More...
 

Public Member Functions

 AbstractMessageTypeDescriptor (MetadataGeneratedName name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo, MetaclassGetter argumentsMetaclassGetter)
 Constructor. More...
 
 AbstractMessageTypeDescriptor (FixedString name, MessageRouting routing, PropertyTypeEditorInfoSharedPtr editorInfo, MetaclassGetter argumentsMetaclassGetter)
 Constructor. More...
 
const MetaclassgetArgumentsMetaclass () const
 Gets the metaclass of the message arguments associated with the message type. More...
 
PropertyTypeEditorInfoSharedPtr getEditorInfo () const
 Gets editor info for the message type. More...
 
const char * 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...
 
 ~AbstractMessageTypeDescriptor ()
 Destructor. More...
 

Static Public Member Functions

static const AbstractMessageTypeDescriptorfind (string_view name)
 Finds an existing message type by name. More...
 
static void registerDescriptor (ManagedDescriptor descriptor)
 Registers a message type instance with managed lifetime. More...
 

Detailed Description

An instance of a AbstractMessageTypeDescriptor represents a single message type in the Kanzi message system in an abstract homogeneous form.

It is used internally by MessageType, DynamicMessageType and AbstractMessageType classes.

To create a new message type, use MessageType.

To work with the existing message types, use the DynamicMessageType and AbstractMessageType classes.

Member Typedef Documentation

◆ MetaclassGetter

Alias for a pointer to getter of metaclass of a message arguments class.

◆ ManagedDescriptor

Constructor & Destructor Documentation

◆ AbstractMessageTypeDescriptor() [1/2]

kanzi::AbstractMessageTypeDescriptor::AbstractMessageTypeDescriptor ( MetadataGeneratedName  name,
MessageRouting  routing,
PropertyTypeEditorInfoSharedPtr  editorInfo,
MetaclassGetter  argumentsMetaclassGetter 
)
explicit

Constructor.

Parameters
nameFully qualified name for the message type as a MetadataGeneratedName.
routingMessage routing mode for the message type.
editorInfoSets the editor information for this message type that Kanzi Studio uses.
argumentsMetaclassGetterFunction pointer to getter of metaclass of the arguments class associated with the message type.

◆ AbstractMessageTypeDescriptor() [2/2]

kanzi::AbstractMessageTypeDescriptor::AbstractMessageTypeDescriptor ( FixedString  name,
MessageRouting  routing,
PropertyTypeEditorInfoSharedPtr  editorInfo,
MetaclassGetter  argumentsMetaclassGetter 
)
explicit

Constructor.

Parameters
nameFully qualified name for the message type as a FixedString.
routingMessage routing mode for the message type.
editorInfoSets the editor information for this message type that Kanzi Studio uses.
argumentsMetaclassGetterFunction pointer to getter of metaclass of the arguments class associated with the message type.

◆ ~AbstractMessageTypeDescriptor()

kanzi::AbstractMessageTypeDescriptor::~AbstractMessageTypeDescriptor ( )

Destructor.

Member Function Documentation

◆ getName()

const char* kanzi::AbstractMessageTypeDescriptor::getName ( ) const
inline

Gets the fully qualified name of the message type in the form "Class.MessageType".

Returns
The fully qualified name of the message type.

◆ getRouting()

MessageRouting kanzi::AbstractMessageTypeDescriptor::getRouting ( ) const
inline

Gets the message routing of the message type.

Returns
MessageRouting mode of the message type.

◆ getArgumentsMetaclass()

const Metaclass* kanzi::AbstractMessageTypeDescriptor::getArgumentsMetaclass ( ) const

Gets the metaclass of the message arguments associated with the message type.

Returns
The Metaclass pointer of the message arguments associated with the MessageType.

◆ getEditorInfo()

PropertyTypeEditorInfoSharedPtr kanzi::AbstractMessageTypeDescriptor::getEditorInfo ( ) const
inline

Gets editor info for the message type.

/return Shared pointer to editor info.

◆ find()

static const AbstractMessageTypeDescriptor* kanzi::AbstractMessageTypeDescriptor::find ( string_view  name)
static

Finds an existing message type by name.

Parameters
nameFully qualified name of the message type.
Returns
Pointer to AbstractMessageTypeDescriptor if found, else nullptr.

◆ registerDescriptor()

static void kanzi::AbstractMessageTypeDescriptor::registerDescriptor ( ManagedDescriptor  descriptor)
static

Registers a message type instance with managed lifetime.


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