Action Engine
Loading...
Searching...
No Matches
act::ActionSchema Struct Reference

Detailed Description

A schema for an action.

This class defines the schema for an action, including its name, input and output parameters with their respective mimetypes. It provides a method to create an ActionMessage that can be used to call the action by sending it in a

See also
WireMessage over a
WireStream.

#include <actionengine/actions/schema.h>

Public Member Functions

ActionMessage GetActionMessage (std::string_view action_id) const
 Creates an ActionMessage to create an action instance with the given ID.
 

Public Attributes

std::string name
 
NameToMimetype inputs
 
NameToMimetype outputs
 

Member Function Documentation

◆ GetActionMessage()

ActionMessage act::ActionSchema::GetActionMessage ( std::string_view action_id) const
nodiscard

Creates an ActionMessage to create an action instance with the given ID.

This method generates an ActionMessage that can be used to call the action by sending it in a WireMessage over a WireStream. The action ID is used to uniquely identify the action instance.

Parameters
action_idThe ID of the action instance. Must not be empty.
Returns
An ActionMessage representing the action with the given ID.

Member Data Documentation

◆ inputs

NameToMimetype act::ActionSchema::inputs

A mapping of input names to their mimetypes.

The input names are used to identify the input parameters in the action message, and the mimetypes are used to specify the type of data that is expected for each input.

◆ name

std::string act::ActionSchema::name

The action's name that is used to register it in the ActionRegistry.

◆ outputs

NameToMimetype act::ActionSchema::outputs

A mapping of output names to their mimetypes.

The output names are used to identify the output parameters in the action message, and the mimetypes are used to specify the type of data that is produced by the action for a given output.


The documentation for this struct was generated from the following files: