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 FbxSdk global namespace
00048 #define FBXFILESDK_NAMESPACE_USE
00049 
00050 #ifndef FBXFILESDK_NAMESPACE
00051     #ifdef FBXFILESDK_NAMESPACE_USE
00052         #define FBXFILESDK_NAMESPACE    fbxsdk_00_Arsenal
00053     #else
00054         #define FBXFILESDK_NAMESPACE
00055     #endif
00056 #endif
00057 
00059 //Define architecture, before everything else
00060 #include <fbxfilesdk/components/kbaselib/karch/arch.h>
00061 #include <fbxfilesdk/components/kbaselib/karch/types.h>
00062 
00064 //Define platform standardization
00065 #if defined(KFBX_DLLINFO) && defined(KARCH_ENV_WIN)
00066     #define KFBX_DLLIMPORT __declspec(dllimport)
00067     #define KFBX_DLLEXPORT __declspec(dllexport)
00068 #else
00069     #define KFBX_DLLIMPORT
00070     #define KFBX_DLLEXPORT
00071 #endif
00072 
00073 #ifndef NULL
00074     #if defined __GNUG__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
00075         #define NULL (__null)
00076     #else   
00077         #ifdef __cplusplus
00078             #define NULL    0
00079         #else
00080             #define NULL    ((void *)0)
00081         #endif
00082     #endif
00083 #endif
00084 
00085 #if !defined(_MAX_PATH)
00086     #define _MAX_PATH 1024
00087 #endif
00088 
00089 #define KFBX_FORWARD( ClassName ) class ClassName; typedef ClassName *H##ClassName;
00090 #define KFBX_FORWARD_HI( ClassName ) class ClassName; typedef ClassName *H##ClassName; typedef H##ClassName HI##ClassName;
00091 
00092 #define KFBX_SAFE_DELETE_PTR(p)         { FbxSdkDelete(p); (p)=NULL; }
00093 #define KFBX_SAFE_DELETE_ARRAY_PTR(a)   { FbxSdkDeleteArray(a); (a)=NULL; }
00094 #define KFBX_SAFE_DESTROY_OBJECT(p)     if(p){ (p)->Destroy(); (p)=NULL; }
00095 
00096 #ifdef KARCH_ENV_WIN
00097     #define snprintf _snprintf // for stdio.h platform compatibility
00098     #ifndef WIN32_LEAN_AND_MEAN
00099         #define WIN32_LEAN_AND_MEAN  // Defined to speed up compilation
00100     #endif
00101 #endif
00102 
00103 #if !defined(KARCH_DEV_MSC)
00104     #ifndef strcmpi
00105         #define strcmpi strcasecmp
00106     #endif
00107     #ifndef stricmp
00108         #define stricmp strcasecmp
00109     #endif
00110     #ifndef strncmpi
00111         #define strncmpi strncasecmp
00112     #endif
00113     #ifndef strnicmp
00114         #define strnicmp strncasecmp
00115     #endif
00116 #endif
00117 
00118 #if defined(KARCH_ENV_LINUX)
00119     #include <malloc.h>
00120     #define _msize ((size_t(*)(void*))malloc_usable_size)
00121 #endif
00122 
00123 #if defined(KARCH_ENV_MACOSX)
00124     #include <malloc/malloc.h>
00125     #define _msize ((size_t(*)(void*))malloc_size)
00126 #endif
00127 
00129 //Define compiler specifics
00130 #ifdef KARCH_DEV_MSC
00131     #pragma warning(disable : 4251) //'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
00132 #endif
00133 
00134 #if defined(KARCH_DEV_GNUC) || defined(KARCH_DEV_GNUC_MACOSX) || defined(KARCH_DEV_GNUC_EE) // GNU compiler
00135     #define K_DEPRECATED __attribute__((deprecated))
00136 #elif defined(KARCH_DEV_INTEL) // Intel compiler
00137     #if (__INTEL_COMPILER >= 810) // Maybe we could use an earlier version, we should check this some day
00138         #define K_DEPRECATED __declspec(deprecated)
00139     #else
00140         #define K_DEPRECATED
00141     #endif
00142 #elif defined(KARCH_DEV_MSC) // Microsoft compiler
00143     #if (_MSC_VER >= 1300) // 7.1
00144         #define K_DEPRECATED __declspec(deprecated)
00145     #else
00146         #define K_DEPRECATED
00147     #endif
00148 #elif defined(KARCH_DEV_MACOSX) // Metrowerks compiler
00149     #define K_DEPRECATED
00150 #else // Unknown compiler
00151     #error Unknown compiler, can't define K_DECRECATED
00152 #endif
00153 
00154 #include <fbxfilesdk/fbxfilesdk_memory.h>
00155 
00156 #endif // FBXFILESDK_FBXFILESDK_DEF_H
00157