My Project
INPLScriptingState.h
1 #pragma once
2 #include "NPLTypes.h"
3 #include <string>
4 
5 namespace NPL
6 {
7  class INPLRuntimeState;
8 
16  {
17  public:
19  virtual void Release() = 0;
20 
24  virtual void* GetState() = 0;
25 
27  virtual bool IsValid() = 0;
28 
35  virtual bool IsScriptFileLoaded(const std::string& filepath) = 0;
36 
45  virtual bool LoadFile(const std::string& filePath, bool bReload) = 0;
46 
52  virtual int DoString(const char* sCall, int nLength = 0) = 0;
53 
59  virtual NPL::NPLReturnCode ActivateFile(const std::string& filepath, const char * code = NULL, int nLength=0) = 0;
60 
66  virtual bool CreateState(const char* name, INPLRuntimeState* pState=NULL) = 0;
67 
71  virtual void DestroyState() = 0;
72 
73 
76  virtual void SetNPLRuntimeState(INPLRuntimeState* pState) = 0;
77 
79  virtual INPLRuntimeState* GetNPLRuntimeState() = 0;
80  };
81 
91  {
92  public:
93 
94  };
95 }
virtual void DestroyState()=0
destroy the runtime state careful with this function, it will make the state invalid.
virtual void * GetState()=0
get the Mono Domain state.
define this to enable debugging of NPL code in visual studio
Definition: INPL.h:9
virtual bool CreateState(const char *name, INPLRuntimeState *pState=NULL)=0
load or restore the runtime state
virtual void SetNPLRuntimeState(INPLRuntimeState *pState)=0
set the NPL runtime state that this mono scripting state belongs to.
INPLRuntimeState interface for DLL interface.
Definition: INPLRuntimeState.h:27
virtual int DoString(const char *sCall, int nLength=0)=0
do string in the current state.
virtual bool IsScriptFileLoaded(const std::string &filepath)=0
whether a given script file is loaded.
virtual void Release()=0
this is something like delete this
virtual bool LoadFile(const std::string &filePath, bool bReload)=0
load a new CS script file without running it.
NPLScriptingState interface.
Definition: INPLScriptingState.h:15
Definition: inftrees.h:24
virtual bool IsValid()=0
return true if the runtime state is valid
virtual NPL::NPLReturnCode ActivateFile(const std::string &filepath, const char *code=NULL, int nLength=0)=0
Activate a local file.
This is the NPLMono DLL plugin interface.
Definition: INPLScriptingState.h:90
virtual INPLRuntimeState * GetNPLRuntimeState()=0
Get the NPL runtime state that this mono scripting state belongs to.