first commit
This commit is contained in:
42
include/modules/viewer_base/viewer_base_vmhook.h
Normal file
42
include/modules/viewer_base/viewer_base_vmhook.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __NMSVIEW_VMHOOK__
|
||||
#define __NMSVIEW_VMHOOK__
|
||||
|
||||
|
||||
#include "script/script_vm.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
class ViewerBase;
|
||||
|
||||
namespace Script {
|
||||
|
||||
//
|
||||
class ViewerEventHookTable : public IVM::IDebug
|
||||
{
|
||||
ViewerBase *viewer;
|
||||
|
||||
public:
|
||||
|
||||
/// Handle a runtime debug step.
|
||||
virtual void OnStep(char type, const char *source, int line, const char *funcname);
|
||||
/// Handle a VM kill event.
|
||||
virtual void Kill(const char *reason);
|
||||
/// Handle a compiler error.
|
||||
virtual void OnCompilerError(const char *error, const char *source, int line);
|
||||
/// Handle a runtime error.
|
||||
virtual void OnRuntimeException(const char *error);
|
||||
|
||||
ViewerEventHookTable(ViewerBase *v) : viewer(v) {}
|
||||
};
|
||||
|
||||
} // Script
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NMSVIEW_VMHOOK__
|
||||
Reference in New Issue
Block a user