fbxfilesdk_def.h

Go to the documentation of this file.
00001 
00004 /**************************************************************************************
00005 
00006  Copyright (C) 2001 - 2010 Autodesk, Inc. and/or its licensors.
00007  All Rights Reserved.
00008 
00009  The coded instructions, statements, computer programs, and/or related material 
00010  (collectively the "Data") in these files contain unpublished information 
00011  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00012  Canada and United States of America federal copyright law and by international 
00013  treaties. 
00014  
00015  The Data may not be disclosed or distributed to third parties, in whole or in
00016  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00017 
00018  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00019  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00020  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00021  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00022  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00023  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00024  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00028  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00029  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00030  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00031  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00032  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00033  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00034  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00035  OR DAMAGE. 
00036 
00037 **************************************************************************************/
00038 #ifndef FBXFILESDK_FBXFILESDK_DEF_H
00039 #define FBXFILESDK_FBXFILESDK_DEF_H
00040 
00041 #include <stdlib.h>
00042 #include <stdio.h>
00043 #include <string.h>
00044 #include <ctype.h>
00045 
00047 //Define FBX SDK version and global namespace
00048 #include <fbxfilesdk/fbxfilesdk_version.h>
00049 
00050 #define FBXFILESDK_NAMESPACE_USE
00051 
00052 #ifndef FBXFILESDK_NAMESPACE
00053     #ifdef FBXFILESDK_NAMESPACE_USE
00054         #define FBXFILESDK_NAMESPACE FBXSDK_NAMESPACE
00055     #else
00056         #define FBXFILESDK_NAMESPACE
00057     #endif
00058 #endif
00059 
00061 //Define architecture, before everything else
00062 #include <fbxfilesdk/components/kbaselib/karch/arch.h>
00063 #include <fbxfilesdk/components/kbaselib/karch/types.h>
00064 
00066 //Define platform standardization
00067 #if defined(FBXSDK_SHARED) && defined(KARCH_ENV_WIN)
00068     #define KFBX_DLLIMPORT __declspec(dllimport)
00069     #define KFBX_DLLEXPORT __declspec(dllexport)
00070 #else
00071     #define KFBX_DLLIMPORT
00072     #define KFBX_DLLEXPORT
00073 #endif
00074 
00075 #ifndef NULL
00076     #if defined __GNUG__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
00077         #define NULL (__null)
00078     #else   
00079         #ifdef __cplusplus
00080             #define NULL    0
00081         #else
00082             #define NULL    ((void *)0)
00083         #endif
00084     #endif
00085 #endif
00086 
00087 #if !defined(_MAX_PATH)
00088     #define _MAX_PATH 1024
00089 #endif
00090 
00091 #define KFBX_FORWARD( ClassName ) class ClassName; typedef ClassName *H##ClassName;
00092 #define KFBX_FORWARD_HI( ClassName ) class ClassName; typedef ClassName *H##ClassName; typedef H##ClassName HI##ClassName;
00093 
00094 #define KFBX_SAFE_DELETE_PTR(p)         { FbxSdkDelete(p); (p)=NULL; }
00095 #define KFBX_SAFE_DELETE_ARRAY_PTR(a)   { FbxSdkDeleteArray(a); (a)=NULL; }
00096 #define KFBX_SAFE_DESTROY_OBJECT(p)     if(p){ (p)->Destroy(); (p)=NULL; }
00097 
00098 #ifdef KARCH_ENV_WIN
00099     #define snprintf _snprintf // for stdio.h platform compatibility
00100     #ifndef WIN32_LEAN_AND_MEAN
00101         #define WIN32_LEAN_AND_MEAN  // Defined to speed up compilation
00102     #endif
00103 #endif
00104 
00105 #if !defined(KARCH_DEV_MSC)
00106     #ifndef strcmpi
00107         #define strcmpi strcasecmp
00108     #endif
00109     #ifndef stricmp
00110         #define stricmp strcasecmp
00111     #endif
00112     #ifndef strncmpi
00113         #define strncmpi strncasecmp
00114     #endif
00115     #ifndef strnicmp
00116         #define strnicmp strncasecmp
00117     #endif
00118 #endif
00119 
00120 #if defined(KARCH_ENV_LINUX)
00121     #include <malloc.h>
00122     #define _msize ((size_t(*)(void*))malloc_usable_size)
00123 #endif
00124 
00125 #if defined(KARCH_ENV_MACOSX)
00126     #include <malloc/malloc.h>
00127     #define _msize ((size_t(*)(void*))malloc_size)
00128 #endif
00129 
00131 //Define compiler specifics
00132 #ifdef KARCH_DEV_MSC
00133     #pragma warning(disable : 4251) //'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
00134 #endif
00135 
00136 #if defined(KARCH_DEV_GNUC) || defined(KARCH_DEV_GNUC_MACOSX) || defined(KARCH_DEV_GNUC_EE) // GNU compiler
00137     #define K_DEPRECATED __attribute__((deprecated))
00138 #elif defined(KARCH_DEV_INTEL) // Intel compiler
00139     #if (__INTEL_COMPILER >= 810) // Maybe we could use an earlier version, we should check this some day
00140         #define K_DEPRECATED __declspec(deprecated)
00141     #else
00142         #define K_DEPRECATED
00143     #endif
00144 #elif defined(KARCH_DEV_MSC) // Microsoft compiler
00145     #if (_MSC_VER >= 1300) // 7.1
00146         #define K_DEPRECATED __declspec(deprecated)
00147     #else
00148         #define K_DEPRECATED
00149     #endif
00150 #elif defined(KARCH_DEV_MACOSX) // Metrowerks compiler
00151     #define K_DEPRECATED
00152 #else // Unknown compiler
00153     #error Unknown compiler, can't define K_DECRECATED
00154 #endif
00155 
00156 #include <fbxfilesdk/fbxfilesdk_memory.h>
00157 
00158 #endif // FBXFILESDK_FBXFILESDK_DEF_H
00159