kaydara.h

00001 #ifndef FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00002 #define FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00003 
00004 /**************************************************************************************
00005 
00006  Copyright (C) 2001 - 2009 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 
00039 /*
00040     Version of the Kernel that historicaly is in sync with the version of MotionBuilder
00041 */
00042 
00043 #define KFBX_KERNEL_VERSION 7000
00044 
00045 /* Product definitions using the Kernel */
00046 
00047 // Alias MotionBuilder Standard
00048 
00049 #if defined(K_STD)
00050     #define K_NO_NLE
00051     #define K_NO_ASSETMNG
00052     #define K_NO_DECK
00053     #define K_NO_IMAGEOPERATOR
00054 #endif
00055 
00056 // FB_KERNEL
00057 
00058 #if defined(FB_KERNEL)
00059     #define K_NO_ACTOR
00060     #define K_NO_ASSETMNG
00061     #define K_NO_AUDIO
00062     #define K_NO_CHARACTER
00063     #define K_NO_DECK
00064     #define K_NO_FOLDER
00065     #define K_NO_IMAGEOPERATOR
00066     #define K_NO_MANIPULATOR
00067     #define K_NO_NOTE
00068     #define K_NO_OPTICAL
00069     #define K_NO_POSE
00070     #define K_NO_RENDERER
00071     #define K_NO_STORY
00072     #define K_NO_UI
00073     #define K_NO_UNDO
00074 #if defined(K_QUICKTIME_PLUGIN)
00075 #undef K_NO_ACTOR
00076 #undef K_NO_CHARACTER
00077 #endif
00078 #endif
00079 
00080 // Make sure the FBX SDK namespace is defined.
00081 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00082 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00083 
00084 #ifdef KFBX_BUILD_SDK
00085 // Automatically grab memory allocations when we're building the FBX SDK.
00086 #   include <fbxfilesdk/fbxfilesdk_memory.h>        
00087 #else
00088 // Otherwise just make sure that malloc/free are defined.
00089 #   ifdef KARCH_DEV_MSC
00090 #       include <malloc.h>
00091 #   else
00092 #       include <stdlib.h>
00093 #   endif
00094 #endif  
00095 
00096 #include <fbxfilesdk/components/kbaselib/karch/arch.h>
00097 #include <fbxfilesdk/components/kbaselib/karch/types.h>
00098 
00099 #ifndef NULL
00100     #if defined __GNUG__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
00101         #define NULL (__null)
00102     #else   
00103         #ifdef __cplusplus
00104             #define NULL    0
00105         #else
00106             #define NULL    ((void *)0)
00107         #endif
00108     #endif
00109 #endif
00110 
00111 #if !defined( _MAX_PATH ) && defined( KARCH_ENV_UNIX )
00112     #define _MAX_PATH 1024
00113 #endif
00114 
00115 #define KFBX_MAX_TEXT_LENGTH 1020 // Max text length, to be used when declaring fixed width char ptrs directly
00116 
00117 #define KFBX_FORWARD( ClassName ) class ClassName; typedef ClassName *H##ClassName;
00118 #define KFBX_FORWARD_HI( ClassName ) class ClassName; typedef ClassName *H##ClassName; typedef H##ClassName HI##ClassName;
00119 
00120 #define KFBX_SAFE_DELETE_PTR( p )           if( p ){ delete (p); (p) = NULL; }
00121 #define KFBX_SAFE_DELETE_ARRAY_PTR( a )     if( a ){ delete [] (a); (a) = NULL; }
00122 
00123 #define KFBX_SAFE_DESTROY_OBJECT( p )       { if( p ){ (p)->Destroy(); (p) = NULL; } }
00124 
00125 
00126 #ifdef KARCH_ENV_WIN
00127     #define snprintf _snprintf // for stdio.h platform compatibility
00128     #ifndef WIN32_LEAN_AND_MEAN
00129         #define WIN32_LEAN_AND_MEAN  // Defined to speed up compilation
00130     #endif
00131 #else
00132     #include <ctype.h>
00133     #include <stdio.h>
00134     #include <string.h>
00135 #endif
00136 
00137 #if defined(KARCH_ENV_MACOSX_CFM)
00138     #define strncmpi strnicmp
00139 #elif !defined(KARCH_DEV_MSC)
00140 
00141     #ifndef strcmpi
00142         #define strcmpi strcasecmp
00143     #endif
00144     #ifndef stricmp
00145         #define stricmp strcasecmp
00146     #endif
00147     #ifndef strncmpi
00148         #define strncmpi strncasecmp
00149     #endif
00150     #ifndef strnicmp
00151         #define strnicmp strncasecmp
00152     #endif
00153 #endif
00154 
00155 #if defined(KARCH_ENV_LINUX)
00156     #include <malloc.h>
00157     #define _msize      ((size_t (*)(void*))malloc_usable_size)
00158 #endif
00159 
00160 #if defined(KARCH_ENV_IRIX)
00161     #include <malloc.h>
00162     #define _msize      ((size_t (*)(void*))mallocblksize)
00163 #endif
00164 
00165 #if defined(KARCH_ENV_MACOSX)
00166     #include <stdlib.h>
00167     #include <malloc/malloc.h>
00168     #define _msize      ((size_t (*)(void*))malloc_size)
00169 #endif
00170 
00171 // Compiler specific
00172 #if defined(KARCH_DEV_MSC) && !defined(KARCH_DEV_INTEL)
00173     #pragma warning(disable: 4097)  // warning C4097: typedef-name 'ClassType' used as synonym for class-name 'KTextTag'
00174     #pragma warning(disable: 4100)  // warning C4100: '?' : unreferenced formal parameter
00175     #pragma warning(disable: 4201)  //nonstandard extension used : nameless struct/union (Level 4) portability  
00176     #pragma warning(disable: 4244)  //conversion from 'const double' to 'float', possible loss of data 
00177     #pragma warning(disable: 4514)  //unreferenced inline function has been removed (Level 4) optimizer  
00178     #pragma warning(disable: 4660)  //template-class specialization 'identifier' is already instantiated (Level 2) compiler
00179     #pragma warning(disable: 4710)  //function (X) not expanded  ??? may be good to know
00180     #pragma warning(disable: 4711)  //function (X) selected for automatic inline expansion
00181     #pragma warning(disable: 4725)  // instruction may be inaccurate on some Pentiums
00182 
00183     #pragma warning( disable : 4018 ) // signed/unsigned mismatch 
00184     #pragma warning( disable : 4244 ) 
00185 
00186 
00187     #pragma warning(error : 4002)   // too many actual parameters for macro 'identifier'
00188     #pragma warning(error : 4130)   // warning C4130: '==' : logical operation on address of string constant
00189     #pragma warning(error : 4238)   // warning C4238: nonstandard extension used : class rvalue used as lvalue
00190     #pragma warning(error : 4311)   // warning C4311: 'type cast' : pointer truncation from 'x *' to 'y'
00191     #pragma warning(error : 4551)   // warning C4551: function call missing argument list
00192     #pragma warning(error : 4553)   // warning C4553: '==' : operator has no effect; did you intend '='?
00193 
00194     // make sure that all declared variables are initialized
00195     #pragma warning(error : 4700)   // warning C4700: (level 1 and 4) local variable 'name' used without having been initialized
00196     #pragma warning(error : 4701)   // warning C4700: (level 4) local variable 'name' may be used without having been initialized
00197 
00198 // temporary
00199     #pragma warning( disable : 4251 )// needs to have dll-interface to be used by clients of class
00200 
00201     #if (_MSC_VER <= 1200) // VC6
00202         #pragma warning( disable : 4786 )// identifier was truncated to '255' characters in the debug information
00203     #endif
00204 #endif
00205 
00206 #if defined(KARCH_DEV_MIPSPRO) || defined(KARCH_DEV_MIPS)
00207     #pragma set woff 1355 // The extra semicolon (";") is ignored.
00208     #pragma set woff 1682 //The overloaded virtual function "" is only partially overridden in class
00209     #pragma set woff 1681 //virtual function mix
00210     #pragma set woff 1183 //signed/unsigned mismatch
00211     
00212 #endif
00213 
00214 #define K_LOCAL_CLASS
00215 
00216 // Deprecated macro, to remind people to stop using certain functions
00217 
00218 #if defined(KARCH_DEV_GNUC) || defined(KARCH_DEV_GNUC_MACOSX) || defined(KARCH_DEV_GNUC_EE) // GNU compiler
00219     #define K_DEPRECATED __attribute__((deprecated))
00220 
00221 #elif defined(KARCH_DEV_INTEL) // Intel compiler
00222     #if (__INTEL_COMPILER >= 810) // Maybe we could use an earlier version, we should check this some day
00223         #define K_DEPRECATED __declspec(deprecated)
00224     #else
00225         #define K_DEPRECATED
00226     #endif
00227 
00228 #elif defined(KARCH_DEV_MSC) // Microsoft compiler
00229     #if (_MSC_VER >= 1300) // 7.1
00230         #define K_DEPRECATED __declspec(deprecated)
00231     #else
00232         #define K_DEPRECATED
00233     #endif
00234 
00235 #elif defined(KARCH_DEV_MIPSPRO) || defined(KARCH_DEV_MIPS) // SGI compiler
00236     #define K_DEPRECATED
00237 
00238 #elif defined(KARCH_DEV_MACOSX) // Metrowerks compiler
00239     #define K_DEPRECATED
00240 
00241 #else // Unknown compiler
00242     #define K_DEPRECATED
00243 
00244 #endif
00245 
00246 
00247 #endif // FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00248