#ifndef MINBASE_DECLS_H
#define MINBASE_DECLS_H
#pragma once
#ifndef MINBASE_IDENTIFY_H
#error Must include minbase_identify.h
#endif
#ifndef OVERRIDE
#define OVERRIDE override
#endif
#ifdef _MSC_VER
#define SINGLE_INHERITANCE __single_inheritance
#define MULTIPLE_INHERITANCE __multiple_inheritance
#else
#define SINGLE_INHERITANCE
#define MULTIPLE_INHERITANCE
#endif
#ifdef _MSC_VER
#define NO_VTABLE __declspec( novtable )
#else
#define NO_VTABLE
#endif
#ifndef _XBOX
#define abstract_class class
#else
#define abstract_class class NO_VTABLE
#endif
#ifndef EXPORT
#ifdef _WIN32
#define EXPORT _declspec( dllexport )
#else
#define EXPORT
#endif
#endif
#if _MSC_VER >= 1400
#define NOALIAS __declspec(noalias)
#define RESTRICT __restrict
#define RESTRICT_FUNC __declspec(restrict)
#else
#define NOALIAS
#define RESTRICT
#define RESTRICT_FUNC
#endif
#if defined( __GNUC__ ) || defined ( COMPILER_GCC ) || defined( COMPILER_SNC )
#define CONSTRUCT_EARLY __attribute__((init_priority(101)))
#else
#define CONSTRUCT_EARLY
#endif
#ifdef _WIN32
#define SELECTANY __declspec(selectany)
#elif defined(__GNUC__) || defined ( COMPILER_GCC ) || defined( COMPILER_SNC )
#define SELECTANY __attribute__((weak))
#else
#define SELECTANY static
#endif
#if defined(_WIN32) && !defined(_XBOX)
#define PLAT_DECL_EXPORT __declspec( dllexport )
#define PLAT_DECL_IMPORT __declspec( dllimport )
#elif defined(__GNUC__) || defined(COMPILER_GCC)
#define PLAT_DECL_EXPORT __attribute__((visibility("default")))
#define PLAT_DECL_IMPORT
#elif defined(_XBOX) || defined(COMPILER_SNC)
#define PLAT_DECL_EXPORT
#define PLAT_DECL_IMPORT
#else
#error "Unsupported Platform."
#endif
#ifdef FASTCALL
#undef FASTCALL
#endif
#if defined(_WIN32)
#define STDCALL __stdcall
#define FASTCALL __fastcall
#elif defined(_PS3)
#if defined( COMPILER_SNC )
#define STDCALL
#define __stdcall
#elif (CROSS_PLATFORM_VERSION >= 1) && !defined( PLATFORM_64BITS ) && !defined( COMPILER_PS3 )
#define STDCALL __attribute__ ((__stdcall__))
#else
#define STDCALL
#define __stdcall __attribute__ ((__stdcall__))
#endif
#define FASTCALL
#elif IsPosix()
#define __stdcall
#define __cdecl
#define STDCALL
#define FASTCALL
#endif
#if defined(_WIN32)
#define NOINLINE __declspec(noinline)
#define NORETURN __declspec(noreturn)
#define FORCEINLINE __forceinline
#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(COMPILER_SNC)
#define NOINLINE __attribute__ ((noinline))
#define NORETURN __attribute__ ((noreturn))
#if defined(COMPILER_GCC) || defined(COMPILER_SNC)
#define FORCEINLINE inline __attribute__ ((always_inline))
#define FORCEINLINE_TEMPLATE inline
#else
#define FORCEINLINE inline
#define FORCEINLINE_TEMPLATE inline
#endif
#endif
#if !defined( __SANITIZE_THREAD__ ) && defined(__has_feature)
#if __has_feature(thread_sanitizer)
#define __SANITIZE_THREAD__ 1
#endif
#endif
#if __SANITIZE_THREAD__
#define ATTR_NO_SANITIZE_THREAD __attribute__(( no_sanitize("thread") ))
#else
#define ATTR_NO_SANITIZE_THREAD
#endif
#ifdef COMPILER_MSVC32
#if _MSC_VER <= 1910
#define STATIC_TEMPLATE_INLINE static
#else
#define STATIC_TEMPLATE_INLINE inline
#endif
#else
#define STATIC_TEMPLATE_INLINE inline
#endif
#if !defined(UNALIGNED)
#if defined(_M_IA64) || defined(_M_AMD64)
#define UNALIGNED __unaligned
#else
#define UNALIGNED
#endif
#endif
#endif