using System;
using System.Collections.Generic;
using System.Reflection.Emit;
using System.Text;
using Sunweaver.DataPrototypes;
namespace Sunweaver.Commands.Abstracts
{
public abstract class UnaryOperation : BasePair
{
protected VirtualMachine VM = null;
public override void Implementation(VirtualMachine VM)
{
//handles fizzle operation
if (VM.Stack.Count() < 1)
return;
Int32 a = VM.Stack.Pop();
this.VM = VM;
Operation(a);
}
///
/// An abstract interface for child classes to implement their specific details
///
/// Top value from the stack
public abstract void Operation(long a);
internal override void Compile(ILGenerator il, Locals locals)
{
throw new NotImplementedException();
}
}
}