Manual_Network.cpp 964 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #ifdef URHO3D_NETWORK
  4. #include "../Precompiled.h"
  5. #include "../AngelScript/APITemplates.h"
  6. #include "../AngelScript/Manual_Network.h"
  7. namespace Urho3D
  8. {
  9. // This function is called before ASRegisterGenerated()
  10. void ASRegisterManualFirst_Network(asIScriptEngine* engine)
  11. {
  12. }
  13. // ========================================================================================
  14. // template <class T> T* Context::GetSubsystem() const | File: ../Core/Context.h
  15. static Network* GetNetwork()
  16. {
  17. return GetScriptContext()->GetSubsystem<Network>();
  18. }
  19. // This function is called after ASRegisterGenerated()
  20. void ASRegisterManualLast_Network(asIScriptEngine* engine)
  21. {
  22. // template <class T> T* Context::GetSubsystem() const | File: ../Core/Context.h
  23. engine->RegisterGlobalFunction("Network@+ get_network()", AS_FUNCTION(GetNetwork), AS_CALL_CDECL);
  24. }
  25. } // namespace Urho3D
  26. #endif // def URHO3D_NETWORK