Ejemplo n.º 1
0
 public void Init()
 {
     ClassIndexes = DeltinScript.VarCollection.Assign(ClassIndexesTag, true, false);
     DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(0, null, Constants.MAX_ARRAY_LENGTH));
     //set the first element to -1. This makes it so that no instance == 0
     DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(-1, null, 0));
 }
Ejemplo n.º 2
0
 public void SetupClasses()
 {
     if (ClassesWereSetUp)
     {
         return;
     }
     globalTranslate.Actions.AddRange(ClassIndexes.SetVariable(new V_EmptyArray()));
     ClassesWereSetUp = true;
 }
Ejemplo n.º 3
0
 public void GetClassIndex(int classIdentifier, IndexReference classReference, ActionSet actionSet)
 {
     actionSet.AddAction(classReference.SetVariable(
                             Element.Part <V_IndexOfArrayValue>(
                                 ClassIndexes.GetVariable(),
                                 new V_Number(0)
                                 )
                             ));
     actionSet.AddAction(ClassIndexes.SetVariable(
                             classIdentifier,
                             null,
                             (Element)classReference.GetVariable()
                             ));
 }
Ejemplo n.º 4
0
 public void Init()
 {
     ClassIndexes = DeltinScript.VarCollection.Assign("_classIndexes", true, false);
     DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(0, null, Constants.MAX_ARRAY_LENGTH));
 }