Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="memoryStack"></param>
 public void Allocate(MemoryStack memoryStack)
 {
     // TODO : create function => object abstract CopyValue(object val_) ?????
     // do this only to copy the value
     VariableNode clone = (VariableNode)CopyImpl();
     memoryStack.Allocate(Id, clone.Value);
 }
Exemplo n.º 2
0
 public void Should_allocate_memory_in_MemoryStack()
 {
     var sequence = new Sequence("test");
     var stringNode = new VariableNodeString();
     stringNode.Value = "Test";
     sequence.AddNode(stringNode);
     var memoryStack = new MemoryStack();
     sequence.AllocateAllVariables(memoryStack);
     Check.That(stringNode.Value)
         .IsEqualTo(memoryStack.GetValueFromID(stringNode.Id).Value);
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="seq_"></param>
 /// <param name="stack_"></param>
 /// <param name="slot_"></param>
 public ProcessingContextStep(SequenceBase seq_, MemoryStack stack_, NodeSlot slot_)
 {
     SequenceBase = seq_;
     MemoryStack  = stack_;
     Slot         = slot_;
 }
Exemplo n.º 4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="memoryStack"></param>
 public void Deallocate(MemoryStack memoryStack)
 {
     memoryStack.Deallocate(Id);
 }