Export.h 862 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. #include "RakNetDefines.h"
  11. #if defined(_WIN32) && !(defined(__GNUC__) || defined(__GCCXML__)) && !defined(_RAKNET_LIB) && defined(_RAKNET_DLL)
  12. #define RAK_DLL_EXPORT __declspec(dllexport)
  13. #else
  14. #define RAK_DLL_EXPORT
  15. #endif
  16. #define STATIC_FACTORY_DECLARATIONS(x) static x* GetInstance(void); \
  17. static void DestroyInstance( x *i);
  18. #define STATIC_FACTORY_DEFINITIONS(x,y) x* x::GetInstance(void) {return RakNet::OP_NEW<y>( _FILE_AND_LINE_ );} \
  19. void x::DestroyInstance( x *i) {RakNet::OP_DELETE(( y* ) i, _FILE_AND_LINE_);}
粤ICP备19079148号