CmScriptMethod.h 579 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include <mono/jit/jit.h>
  4. namespace CamelotFramework
  5. {
  6. class CM_EXPORT ScriptMethod
  7. {
  8. public:
  9. MonoObject* invoke(ScriptObject* instance, void** params);
  10. /**
  11. * @brief Gets a thunk for this method. A thunk is a C++ like function
  12. * pointer that you can use for calling the method.
  13. *
  14. * @note This is the fastest way of calling managed code.
  15. */
  16. void* getThunk();
  17. private:
  18. friend class ScriptClass;
  19. ScriptMethod(MonoMethod* method);
  20. MonoMethod* mMethod;
  21. void* mThunk;
  22. };
  23. }