Private
Public Access
Implemented non implemented methods
This commit is contained in:
1 parent
338aae4474
commit
3cb58ca6b1
1 file changed
+14
-10
+14
-10
@@ -6,45 +6,49 @@ namespace Advanced_Software_Engineering.Verbs.Flow {
|
|||||||
public class MethodChunk : VerbChunk, IVerb, IValue {
|
public class MethodChunk : VerbChunk, IVerb, IValue {
|
||||||
|
|
||||||
ValueStorage valueStorage;
|
ValueStorage valueStorage;
|
||||||
VariableValue[] variableValues;
|
bool init = false;
|
||||||
|
|
||||||
public MethodChunk(VariableValue[] variableValues, ValueStorage valueStorage) : base() {
|
public MethodChunk(ValueStorage valueStorage) : base() {
|
||||||
this.valueStorage = valueStorage;
|
this.valueStorage = valueStorage;
|
||||||
this.variableValues = variableValues;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void ExecuteVerb() {
|
public new void ExecuteVerb() {
|
||||||
valueStorage.IncreaseStack();
|
valueStorage.IncreaseStack();
|
||||||
base.ExecuteVerb();
|
base.ExecuteVerb();
|
||||||
valueStorage.DecreaseStack();
|
valueStorage.DecreaseStack();
|
||||||
|
init = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IValue GetResult() {
|
||||||
|
return valueStorage.GetVariable("res");
|
||||||
}
|
}
|
||||||
|
|
||||||
public IValue Clone() {
|
public IValue Clone() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetOriginalType() {
|
public string GetOriginalType() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().GetOriginalType();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool isInitialised() {
|
public bool isInitialised() {
|
||||||
throw new System.NotImplementedException();
|
return init;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ToBool() {
|
public bool ToBool() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().ToBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color ToColor() {
|
public Color ToColor() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().ToColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double ToDouble() {
|
public double ToDouble() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().ToDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ToInt() {
|
public int ToInt() {
|
||||||
throw new System.NotImplementedException();
|
return GetResult().ToInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user