NETCoreThunk.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #pragma once
  2. #include "CSComponent.h"
  3. namespace Atomic
  4. {
  5. typedef CSComponent* (*CSComponentCreateFunctionPtr)(const char* csComponentTypeName);
  6. typedef void (*CSComponentCallMethodFunctionPtr)(unsigned id, CSComponentMethod method, float value);
  7. typedef void (*CSBeginSendEventFunctionPtr)(unsigned senderRefID, unsigned eventType, VariantMap* eventData);
  8. typedef void (*Atomic_NETManaged_SetCSComponentCreate_Function)(CSComponentCreateFunctionPtr ptr);
  9. typedef void (*Atomic_NETManaged_SetCSComponentCallMethod_Function)(CSComponentCallMethodFunctionPtr ptr);
  10. typedef void (*Atomic_NETManaged_SetCSBeginSendEvent_Function)(CSBeginSendEventFunctionPtr ptr);
  11. typedef void (*Atomic_AObject_SendEvent_Function)(Object* object, const char* eventType);
  12. typedef RefCounted* (*AtomicEngine_GetSubsystem_Function)(const char* name);
  13. typedef unsigned (*Atomic_StringToStringHash_Function)(const char* stringValue);
  14. typedef RefCounted* (*Atomic_VariantMap_GetInstance_Function)(VariantMap& vmap, const char* key);
  15. typedef void (*Atomic_RefCounted_SafeAddRef_Function)(unsigned id);
  16. typedef void (*Atomic_RefCounted_SafeReleaseRef_Function)(unsigned id);
  17. typedef ClassID (*Atomic_RefCounted_GetClassID_Function)(RefCounted* refCounted);
  18. typedef struct AtomicNETCoreThunk_s
  19. {
  20. Atomic_NETManaged_SetCSComponentCreate_Function __Atomic_NETManaged_SetCSComponentCreate;
  21. Atomic_NETManaged_SetCSComponentCallMethod_Function __Atomic_NETManaged_SetCSComponentCallMethod;
  22. Atomic_NETManaged_SetCSBeginSendEvent_Function __Atomic_NETManaged_SetCSBeginSendEvent;
  23. Atomic_AObject_SendEvent_Function __Atomic_AObject_SendEvent;
  24. AtomicEngine_GetSubsystem_Function __AtomicEngine_GetSubsystem;
  25. Atomic_StringToStringHash_Function __Atomic_StringToStringHash;
  26. Atomic_VariantMap_GetInstance_Function __Atomic_VariantMap_GetInstance;
  27. Atomic_RefCounted_SafeAddRef_Function __Atomic_RefCounted_SafeAddRef;
  28. Atomic_RefCounted_SafeReleaseRef_Function __Atomic_RefCounted_SafeReleaseRef;
  29. Atomic_RefCounted_GetClassID_Function __Atomic_RefCounted_GetClassID;
  30. } AtomicNETCoreThunk_t;
  31. void NetCoreThunkInit();
  32. void Atomic_NETManaged_SetCSComponentCreate(CSComponentCreateFunctionPtr method);
  33. void Atomic_NETManaged_SetCSComponentCallMethod(CSComponentCallMethodFunctionPtr method);
  34. void Atomic_NETManaged_SetCSBeginSendEvent(CSBeginSendEventFunctionPtr method);
  35. void Atomic_AObject_SendEvent(Object* object, const char* eventType);
  36. ClassID Atomic_RefCounted_GetClassID(RefCounted* refCounted);
  37. RefCounted* AtomicEngine_GetSubsystem(const char* name);
  38. void Atomic_RefCounted_SafeAddRef(unsigned id);
  39. void Atomic_RefCounted_SafeReleaseRef(unsigned id);
  40. unsigned Atomic_StringToStringHash(const char* stringValue);
  41. // Variant Map
  42. RefCounted* Atomic_VariantMap_GetInstance(VariantMap& vmap, const char* key);
  43. }