BsMonoMethod.h 650 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "BsMonoPrerequisites.h"
  3. #include <mono/jit/jit.h>
  4. namespace BansheeEngine
  5. {
  6. class BS_MONO_EXPORT MonoMethod
  7. {
  8. public:
  9. MonoObject* invoke(MonoObject* 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() const;
  17. CM::String getName() const;
  18. private:
  19. friend class MonoClass;
  20. friend class MonoProperty;
  21. MonoMethod(::MonoMethod* method);
  22. ::MonoMethod* mMethod;
  23. void* mThunk;
  24. };
  25. }