- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxsdk_def.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00018 #ifndef _FBXSDK_DEFINITION_H_
    00019 #define _FBXSDK_DEFINITION_H_
    00020
    00021 //---------------------------------------------------------------------------------------
    00022 //System Includes
    00023 #include <stdlib.h>
    00024 #include <stdarg.h>
    00025 #include <stddef.h>
    00026 #include <stdio.h>
    00027 #include <ctype.h>
    00028 #include <string.h>
    00029 #include <wchar.h>
    00030 #include <locale.h>
    00031 #include <float.h>
    00032 #include <math.h>
    00033 #include <time.h>
    00034
    00035 //---------------------------------------------------------------------------------------
    00036 //Define Version and Namespace
    00037 #include <fbxsdk/fbxsdk_version.h>
    00038
    00039 //---------------------------------------------------------------------------------------
    00040 //Define Architecture
    00041 #include <fbxsdk/core/arch/fbxarch.h>
    00042 #include <fbxsdk/core/arch/fbxtypes.h>
    00043 #include <fbxsdk/core/arch/fbxdebug.h>
    00044 #include <fbxsdk/core/arch/fbxalloc.h>
    00045 #include <fbxsdk/core/arch/fbxnew.h>
    00046 #include <fbxsdk/core/arch/fbxstdcompliant.h>
    00047
    00048 //---------------------------------------------------------------------------------------
    00049 //Platform Standardization
    00050 #ifndef NULL
    00051     #if defined(__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
    00052         #define NULL (__null)
    00053     #else
    00054         #if defined(__cplusplus)
    00055             #define NULL 0
    00056         #else
    00057             #define NULL ((void*)0)
    00058         #endif
    00059     #endif
    00060 #endif
    00061
    00062 #if !defined(_MAX_PATH)
    00063     #define _MAX_PATH 260
    00064 #endif
    00065
    00066 #if defined(FBXSDK_ENV_WIN)
    00067     #define snprintf _snprintf // for stdio.h platform compatibility
    00068     #ifndef WIN32_LEAN_AND_MEAN
    00069         #define WIN32_LEAN_AND_MEAN  // Defined to speed up compilation
    00070     #endif
    00071 #endif
    00072
    00073 #if !defined(FBXSDK_COMPILER_MSC)
    00074     #ifndef strcmpi
    00075         #define strcmpi strcasecmp
    00076     #endif
    00077     #ifndef stricmp
    00078         #define stricmp strcasecmp
    00079     #endif
    00080     #ifndef strncmpi
    00081         #define strncmpi strncasecmp
    00082     #endif
    00083     #ifndef strnicmp
    00084         #define strnicmp strncasecmp
    00085     #endif
    00086 #endif
    00087
    00088 //---------------------------------------------------------------------------------------
    00089 //Compiler Specifics
    00090 #if defined(FBXSDK_COMPILER_MSC)
    00091     #pragma warning(disable : 4251) //'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
    00092     #if _MSC_VER >= 1300 // 7.1
    00093         #define FBX_DEPRECATED __declspec(deprecated)
    00094     #else
    00095         #define FBX_DEPRECATED
    00096     #endif
    00097 #elif defined(FBXSDK_COMPILER_GNU)
    00098     #define FBX_DEPRECATED __attribute__((deprecated))
    00099 #elif defined(FBXSDK_COMPILER_INTEL)
    00100     #if __INTEL_COMPILER >= 810
    00101         #define FBX_DEPRECATED __declspec(deprecated)
    00102     #else
    00103         #define FBX_DEPRECATED
    00104     #endif
    00105 #else
    00106     #error Unsupported compiler!
    00107 #endif
    00108
    00109 //---------------------------------------------------------------------------------------
    00110 //Useful Macros
    00111 #define FBX_SAFE_DELETE(p)          {FbxDelete(p);(p)=NULL;}
    00112 #define FBX_SAFE_DELETE_ARRAY(a)    {FbxDeleteArray(a);(a)=NULL;}
    00113 #define FBX_SAFE_DESTROY(p)         if(p){(p)->Destroy();(p)=NULL;}
    00114 #define FBX_SAFE_FREE(p)            if(p){FbxFree(p);(p)=NULL;}
    00115
    00116 #endif /* _FBXSDK_DEFINITION_H_ */