A registry for ActionEngine actions.
This class is used to register actions with their schemas and handlers, and provides methods to create action messages and instances based on the registered schemas. 
|  | 
| void | Register (std::string_view name, const ActionSchema &schema, const ActionHandler &handler) | 
|  | Registers an action with the given name, schema, and handler. 
 | 
|  | 
| bool | IsRegistered (std::string_view name) const | 
|  | Checks if an action with the given name is registered. 
 | 
|  | 
| ActionMessage | MakeActionMessage (std::string_view name, std::string_view id) const | 
|  | Creates an ActionMessage for the action with the given name and ID. 
 | 
|  | 
| std::unique_ptr< Action > | MakeAction (std::string_view name, std::string_view action_id="", std::vector< Port > inputs={}, std::vector< Port > outputs={}) const | 
|  | Creates an action instance based on the registered schema and handler. 
 | 
|  | 
| const ActionSchema & | GetSchema (std::string_view name) const | 
|  | Gets the schema of the action with the given name. 
 | 
|  | 
| const ActionHandler & | GetHandler (std::string_view name) const | 
|  | Gets the handler of the action with the given name. 
 | 
|  | 
  
  | 
        
          | bool act::ActionRegistry::IsRegistered | ( | std::string_view | name | ) | const |  | nodiscard | 
 
Checks if an action with the given name is registered. 
Notice that when dealing with a particular registry whose content you are not sure about, you MUST always check if the action is registered before using any other methods, as otherwise they will fail, terminating the program with a CHECK failure.
- Parameters
- 
  
    | name | The name of the action to check. |  
 
- Returns
- True if the action is registered, false otherwise. 
 
 
  
  | 
        
          | std::unique_ptr< Action > act::ActionRegistry::MakeAction | ( | std::string_view | name, |  
          |  |  | std::string_view | action_id = "", |  
          |  |  | std::vector< Port > | inputs = {}, |  
          |  |  | std::vector< Port > | outputs = {} ) const |  | nodiscard | 
 
Creates an action instance based on the registered schema and handler. 
This method creates an Action object that can be used to call or run the action with the specified inputs and outputs. The action will be created with the schema and handler registered under the given name.
Note: TERMINATES if the action is not registered, so you must use IsRegistered() before calling this method to ensure the action exists.
- Parameters
- 
  
    | name | The key of the action to create, which must be registered. |  | action_id | The ID of the action instance. If empty, a unique ID will be generated. |  | inputs | A vector of input ports for the action. |  | outputs | A vector of output ports for the action. |  
 
- Returns
- An owning pointer to the newly created Action instance.