Fixed a problem with ModelComponent's names
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / snippets / highlevelstatehandlers / standard / atomic / BitVectorSplittingAtomicHighLevelStateHandler.java
index 0e2328a..b5630a5 100644 (file)
@@ -6,7 +6,7 @@ import java.util.List;
 import net.mograsim.logic.core.types.Bit;
 import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
-import net.mograsim.logic.model.serializing.IdentifierGetter;
+import net.mograsim.logic.model.serializing.IdentifyParams;
 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;
@@ -56,7 +56,7 @@ public class BitVectorSplittingAtomicHighLevelStateHandler implements AtomicHigh
        {
                clearVectorParts();
                if (targets.size() != lengthes.size())
-                       throw new IllegalArgumentException("Targets list and lenghtes list have different sizes");
+                       throw new IllegalArgumentException("Targets list and lengthes list have different sizes");
                vectorPartTargets.addAll(targets);
                vectorPartLengthes.addAll(lengthes);
                length += lengthes.stream().mapToInt(Integer::intValue).sum();
@@ -98,7 +98,13 @@ public class BitVectorSplittingAtomicHighLevelStateHandler implements AtomicHigh
        }
 
        @Override
-       public BitVectorSplittingAtomicHighLevelStateHandlerParams getParamsForSerializing(IdentifierGetter idGetter)
+       public String getIDForSerializing(IdentifyParams idParams)
+       {
+               return "bitVectorSplitting";
+       }
+
+       @Override
+       public BitVectorSplittingAtomicHighLevelStateHandlerParams getParamsForSerializing(IdentifyParams idParams)
        {
                BitVectorSplittingAtomicHighLevelStateHandlerParams params = new BitVectorSplittingAtomicHighLevelStateHandlerParams();
                params.vectorPartTargets = new ArrayList<>(vectorPartTargets);