1 #ifndef __EIENNET_BASE_HPP__ 2 #define __EIENNET_BASE_HPP__ 8 #if defined(_MSC_VER) || defined(WIN32) 9 #pragma warning( disable: 4251 ) 10 #ifdef EIENNET_DLL_EXPORTS 11 #define EIENNET_DLL __declspec(dllexport) 13 #define EIENNET_DLL __declspec(dllimport) 16 #define EIENNET_API __stdcall 26 #define EIENNET_FUNC_DECL(ret) EIENNET_DLL ret EIENNET_API 27 #define EIENNET_FUNC_IMPL(ret) ret EIENNET_API 34 template <
typename _Ty >
40 for (
int i = 0; i <
sizeof(_Ty) / 2; ++i )
43 reinterpret_cast<winux::byte*
>(&v)[i] = reinterpret_cast<winux::byte*>(&v)[
sizeof(_Ty) - 1 - i];
44 reinterpret_cast<winux::byte*
>(&v)[
sizeof(_Ty) - 1 - i] = t;
51 template <
typename _Ty >
57 for (
int i = 0; i <
sizeof(_Ty) / 2; ++i )
60 reinterpret_cast<winux::byte*
>(&v)[i] = reinterpret_cast<winux::byte*>(&v)[
sizeof(_Ty) - 1 - i];
61 reinterpret_cast<winux::byte*
>(&v)[
sizeof(_Ty) - 1 - i] = t;
69 #endif // __EIENNET_BASE_HPP__