Stay organized with collections
Save and categorize content based on your preferences.
blockly > serialization > procedures > ProcedureSerializer
serialization.procedures.ProcedureSerializer class
Serializer for saving and loading procedure state.
Signature:
export declare class ProcedureSerializer<ProcedureModel extends IProcedureModel, ParameterModel extends IParameterModel> implements ISerializer
Implements: ISerializer
Constructors
Properties
Property |
Modifiers |
Type |
Description |
priority |
|
number |
|
Methods
Method |
Modifiers |
Description |
clear(workspace) |
|
Disposes of any procedure models that exist on the workspace. |
load(state, workspace) |
|
Deserializes the procedures models defined by the given state into the workspace. |
save(workspace) |
|
Serializes the procedure models of the given workspace. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `ProcedureSerializer` class is responsible for saving and loading the state of procedures in Blockly workspaces."],["It utilizes separate models for procedures and parameters, requiring their classes during instantiation."],["This serializer handles the serialization and deserialization of procedure models, enabling persistence and retrieval of procedure definitions."],["It also provides functionality to clear existing procedure models from a workspace before loading new ones."]]],["The `ProcedureSerializer` class handles saving and loading procedure states. It serializes procedure models from a workspace using the `save` method and deserializes them back into the workspace with the `load` method. The `clear` method removes existing procedure models from the workspace. The constructor takes `procedureModelClass` and `parameterModelClass`. This class implements the `ISerializer` interface and includes a priority property.\n"]]