1 #ifndef SHEEP_SHEEPCPP_H
2 #define SHEEP_SHEEPCPP_H
38 class IVirtualMachine;
182 virtual void SetTag(
void* tag) = 0;
184 virtual void*
GetTag() = 0;
202 virtual int SetImportCallback(
const char* importName, ImportCallback callback) = 0;
246 virtual const char*
GetData() = 0;
285 virtual const char*
GetMessage(
int index) = 0;
363 #endif // SHEEP_SHEEPCPP_H
virtual int PushIntOntoStack(int value)=0
virtual SheepLanguageVersion GetLanguageVersion()=0
Gets the language version with which this script was created.
virtual ICompiledScriptOutput * GenerateCompiledOutput()=0
The context has finished execution.
virtual int SetImportCallback(const char *importName, ImportCallback callback)=0
virtual int PrepareScriptForExecution(IScript *script, const char *function, IExecutionContext **context)=0
virtual int GetNumMessages()=0
Gets the number of messages that were generated during compilation.
Represents a Sheep Virtual Machine which executes compiled Sheep scripts.
Definition: sheepcpp.h:167
SHP_DECLSPEC Sheep::IVirtualMachine *SHP_APIENTRY CreateSheepVirtualMachine(Sheep::SheepLanguageVersion version)
Interface to a Compiler object that compiles sheep scripts.
Definition: sheepcpp.h:300
SheepLanguageVersion
Represents a specific version of Sheep.
Definition: sheepcpp.h:28
The context has been prepared for execution and is ready to execute.
virtual void Release()=0
Releases the compiled script output object.
virtual int GetMessageLineNumber(int index)=0
Gets the line number for which the particular message was generated.
SHP_DECLSPEC int SHP_APIENTRY CreateScriptFromBytecode(const char *bytecode, int length, Sheep::IScript **result)
virtual int PushFloatOntoStack(float value)=0
Definition: sheepcpp.h:233
virtual int GetSize()=0
Returns the size (in bytes) of the compiled output.
virtual int PopFloatFromStack(float *result)=0
virtual SymbolType GetVariableType(int index)=0
Gets the type of variable at the specified index.
virtual int GetNumVariables()=0
Gets the number of global variables within the script associated with the Context.
virtual IVirtualMachine * GetParentVirtualMachine()=0
Gets the parent Sheep::IVirtualMachine that owns this context.
virtual int SetVariableInt(int index, int value)=0
virtual SheepLanguageVersion GetLanguageVersion()=0
Gets the language version with which this virtual machine was created.
virtual int SetVariableString(int index, const char *value)=0
The script was successfully compiled and is ready to run.
virtual void SetTag(void *tag)=0
virtual int GetVariableString(int index, const char **result)=0
32-bit floating point symbol type
virtual int PopStringFromStack(const char **result)=0
The context has been suspended and is ready to resume.
ScriptStatus
Represents the status of an IScript object.
Definition: sheepcpp.h:250
virtual int DefineImportFunction(const char *name, SymbolType returnType, SymbolType parameters[], int numParameters)=0
virtual const char * GetMessage(int index)=0
Gets the message text of the particular message generated during compilation.
Vanilla version of Sheep with no enhancements (Gabriel Knight 3-level features only) ...
virtual void Release()=0
Releases the disassembly.
The context is currently executing.
There was an error compiling the script.
Variable length string variable type.
Represents a disassembly of an IScript object.
Definition: sheepcpp.h:218
SHP_DECLSPEC Sheep::ICompiler *SHP_APIENTRY CreateSheepCompiler(Sheep::SheepLanguageVersion version)
virtual IDisassembly * GenerateDisassembly()=0
Definition: sheepcpp.h:59
virtual const char * GetVariableName(int index)=0
Gets the name of the given variable, or null if the index is invalid.
virtual int GetVariableInt(int index, int *result)=0
Interface to a Script object.
Definition: sheepcpp.h:263
virtual int SetVariableFloat(int index, float value)=0
virtual ScriptStatus GetStatus()=0
Gets the status of the script.
SymbolType
Represents a Sheep symbol type.
Definition: sheepcpp.h:12
virtual int PopIntFromStack(int *result)=0
virtual ExecutionContextState GetState()=0
Gets the current state of the context.
virtual void * GetTag()=0
Gets the tag that was set earlier, or null if no tag has been set.
virtual int SetEndWaitCallback(EndWaitCallback callback)=0
virtual IScript * CompileScript(const char *script)=0
ExecutionContextState
Definition: sheepcpp.h:40
virtual const char * GetData()=0
Returns the raw compiled output data.
virtual const char * GetDisassemblyText()=0
32-bit integer symbol type
virtual int GetVariableFloat(int index, float *result)=0
The script is not valid and cannot run.
virtual SheepLanguageVersion GetLanguageVersion()=0
Gets the language version with which this compiler was created.