X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fsnippets%2Fhighlevelstatehandlers%2Fstandard%2Fsubcomponent%2FDelegatingSubcomponentHighLevelStateHandler.java;h=3347377e432125f03098ff17ef29fa16e98dc587;hb=a25f554756e1bc9a1f842293aefe60a220d8b950;hp=bc864d1e53965ecf2b182007da499b631a34f115;hpb=c008ad2e6b93de6e381c74e1f4bb4983055eb249;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java index bc864d1e..3347377e 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java @@ -2,7 +2,10 @@ package net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.subcom import net.mograsim.logic.model.model.components.GUIComponent; import net.mograsim.logic.model.model.components.submodels.SubmodelComponent; +import net.mograsim.logic.model.serializing.IdentifierGetter; +import net.mograsim.logic.model.snippets.SnippetDefinintion; import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.HighLevelStateHandlerContext; +import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.StandardHighLevelStateHandlerSnippetSuppliers; public class DelegatingSubcomponentHighLevelStateHandler implements SubcomponentHighLevelStateHandler { @@ -68,9 +71,25 @@ public class DelegatingSubcomponentHighLevelStateHandler implements Subcomponent return prefix == null ? subStateID : prefix + '.' + subStateID; } + @Override + public DelegatingSubcomponentHighLevelStateHandlerParams getParamsForSerializing(IdentifierGetter idGetter) + { + DelegatingSubcomponentHighLevelStateHandlerParams params = new DelegatingSubcomponentHighLevelStateHandlerParams(); + params.delegateTarget = delegateTarget.name; + params.prefix = prefix; + return params; + } + public static class DelegatingSubcomponentHighLevelStateHandlerParams { public String delegateTarget; public String prefix; } + + static + { + StandardHighLevelStateHandlerSnippetSuppliers.subcomponentHandlerSupplier + .setSnippetSupplier(DelegatingSubcomponentHighLevelStateHandler.class.getCanonicalName(), SnippetDefinintion + .create(DelegatingSubcomponentHighLevelStateHandlerParams.class, DelegatingSubcomponentHighLevelStateHandler::new)); + } } \ No newline at end of file