FBX SDK Reference Guide: kaydara.h Source File
00001 #ifndef FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00002 #define FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00003 
00004 /**************************************************************************
00005  Copyright (C) 1994 - 2004 Systemes Alias Quebec Inc. and/or its licensors.
00006  All rights reserved.
00007 
00008  The  coded  instructions,  statements, computer programs, and/or related
00009  material  (collectively  the  "Data") in these files contain unpublished
00010  information  proprietary  to  Systemes  Alias  Quebec  Inc.  and/or  its
00011  licensors,  which  is protected by Canadian and US federal copyright law
00012  and by international treaties.
00013 
00014  The  Data  may  not  be  disclosed or distributed to third parties or be
00015  copied  or  duplicated,  in  whole or in part, without the prior written
00016  consent of Alias Systems Corp ("Alias").
00017 
00018  THE  DATA  IS  PROVIDED  "AS IS".  ALIAS HEREBY DISCLAIMS ALL WARRANTIES
00019  RELATING TO THE DATA, INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS
00020  OR   IMPLIED  WARRANTIES  OF  NON-INFRINGEMENT,  MERCHANTABILITY  AND/OR
00021  FITNESS  FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ALIAS BE LIABLE FOR
00022  ANY  DAMAGES WHATSOEVER, WHETHER DIRECT, INDIRECT, SPECIAL, OR PUNITIVE,
00023  WHETHER  IN  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00024  OR  IN  EQUITY,  ARISING  OUT OF ACCESS TO, USE OF, OR RELIANCE UPON THE
00025  DATA.
00026 **************************************************************************/
00027 
00028 /*
00029     Version of the Kernel that historicaly is in sync with the version of MotionBuilder
00030 */
00031 
00032 #define KFBX_KERNEL_VERSION 7000
00033 
00034 /* Product definitions using the Kernel */
00035 
00036 // Alias MotionBuilder Standard
00037 
00038 #if defined(K_STD)
00039     #define K_NO_NLE
00040     #define K_NO_ASSETMNG
00041     #define K_NO_DECK
00042     #define K_NO_IMAGEOPERATOR
00043 #endif
00044 
00045 // Alias MotionBuilder PLE
00046 
00047 #if defined(K_PLE)
00048 #endif
00049 
00050 // FB_KERNEL
00051 
00052 #if defined(FB_KERNEL)
00053     #define K_NO_ACTOR
00054     #define K_NO_ASSETMNG
00055     #define K_NO_AUDIO
00056     #define K_NO_CHARACTER
00057     #define K_NO_DECK
00058     #define K_NO_FOLDER
00059     #define K_NO_IMAGEOPERATOR
00060     #define K_NO_MANIPULATOR
00061     #define K_NO_NOTE
00062     #define K_NO_OPTICAL
00063     #define K_NO_POSE
00064     #define K_NO_RENDERER
00065     #define K_NO_STORY
00066     #define K_NO_UI
00067     #define K_NO_UNDO
00068 #endif
00069 
00070 // Make sure the FBX SDK namespace is defined.
00071 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00072 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00073 
00074 #ifdef KFBX_BUILD_SDK
00075 // Automatically grab memory allocations when we're building the FBX SDK.
00076 #   include <fbxfilesdk/fbxfilesdk_memory.h>        
00077 #else
00078 // Otherwise just make sure that malloc/free are defined.
00079 #   ifdef KARCH_DEV_MSC
00080 #       include <malloc.h>
00081 #   else
00082 #       include <stdlib.h>
00083 #   endif
00084 #endif  
00085 
00086 #include <fbxfilesdk/components/kbaselib/karch/arch.h>
00087 #include <fbxfilesdk/components/kbaselib/karch/types.h>
00088 
00089 #ifndef NULL
00090     #if defined __GNUG__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
00091         #define NULL (__null)
00092     #else   
00093         #ifdef __cplusplus
00094             #define NULL    0
00095         #else
00096             #define NULL    ((void *)0)
00097         #endif
00098     #endif
00099 #endif
00100 
00101 #if !defined( _MAX_PATH ) && defined( KARCH_ENV_UNIX )
00102     #define _MAX_PATH 1024
00103 #endif
00104 
00105 #define KFBX_MAX_TEXT_LENGTH 1020 // Max text length, to be used when declaring fixed width char ptrs directly
00106 
00107 #define KFBX_FORWARD( ClassName ) class ClassName; typedef ClassName *H##ClassName;
00108 #define KFBX_FORWARD_HI( ClassName ) class ClassName; typedef ClassName *H##ClassName; typedef H##ClassName HI##ClassName;
00109 
00110 #define KFBX_SAFE_DELETE_PTR( p )           if( p ){ delete (p); (p) = NULL; }
00111 #define KFBX_SAFE_DELETE_ARRAY_PTR( a )     if( a ){ delete [] (a); (a) = NULL; }
00112 
00113 #define KFBX_SAFE_DESTROY_OBJECT( p )       { if( p ){ (p)->Destroy(); (p) = NULL; } }
00114 
00115 
00116 #ifdef KARCH_ENV_WIN
00117     #define snprintf _snprintf // for stdio.h platform compatibility
00118     #ifndef WIN32_LEAN_AND_MEAN
00119         #define WIN32_LEAN_AND_MEAN  // Defined to speed up compilation
00120     #endif
00121 #else
00122     #include <ctype.h>
00123     #include <stdio.h>
00124     #include <string.h>
00125 #endif
00126 
00127 #if defined(KARCH_ENV_MACOSX_CFM)
00128     #define strncmpi strnicmp
00129 #elif !defined(KARCH_DEV_MSC)
00130 
00131     #ifndef strcmpi
00132         #define strcmpi strcasecmp
00133     #endif
00134     #ifndef stricmp
00135         #define stricmp strcasecmp
00136     #endif
00137     #ifndef strncmpi
00138         #define strncmpi strncasecmp
00139     #endif
00140     #ifndef strnicmp
00141         #define strnicmp strncasecmp
00142     #endif
00143 #endif
00144 
00145 #if defined(KARCH_ENV_LINUX)
00146     #include <malloc.h>
00147     #define _msize      malloc_usable_size
00148 #endif
00149 
00150 #if defined(KARCH_ENV_IRIX)
00151     #include <malloc.h>
00152     #define _msize      mallocblksize 
00153 #endif
00154 
00155 #if defined(KARCH_ENV_MACOSX)
00156     #include <stdlib.h>
00157     #include <malloc/malloc.h>
00158     #define _msize      malloc_size
00159 #endif
00160 
00161 // Compiler specific
00162 #if defined(KARCH_DEV_MSC) && !defined(KARCH_DEV_INTEL)
00163     #pragma warning(disable: 4097)  // warning C4097: typedef-name 'ClassType' used as synonym for class-name 'KTextTag'
00164     #pragma warning(disable: 4100)  // warning C4100: '?' : unreferenced formal parameter
00165     #pragma warning(disable: 4201)  //nonstandard extension used : nameless struct/union (Level 4) portability  
00166     #pragma warning(disable: 4244)  //conversion from 'const double' to 'float', possible loss of data 
00167     #pragma warning(disable: 4514)  //unreferenced inline function has been removed (Level 4) optimizer  
00168     #pragma warning(disable: 4660)  //template-class specialization 'identifier' is already instantiated (Level 2) compiler
00169     #pragma warning(disable: 4710)  //function (X) not expanded  ??? may be good to know
00170     #pragma warning(disable: 4711)  //function (X) selected for automatic inline expansion
00171     #pragma warning(disable: 4725)  // instruction may be inaccurate on some Pentiums
00172 
00173     #pragma warning( disable : 4018 ) // signed/unsigned mismatch 
00174     #pragma warning( disable : 4244 ) 
00175 
00176 
00177     #pragma warning(error : 4002)   // too many actual parameters for macro 'identifier'
00178     #pragma warning(error : 4130)   // warning C4130: '==' : logical operation on address of string constant
00179     #pragma warning(error : 4238)   // warning C4238: nonstandard extension used : class rvalue used as lvalue
00180     #pragma warning(error : 4311)   // warning C4311: 'type cast' : pointer truncation from 'x *' to 'y'
00181     #pragma warning(error : 4551)   // warning C4551: function call missing argument list
00182     #pragma warning(error : 4553)   // warning C4553: '==' : operator has no effect; did you intend '='?
00183 
00184     // make sure that all declared variables are initialized
00185     #pragma warning(error : 4700)   // warning C4700: (level 1 and 4) local variable 'name' used without having been initialized
00186     #pragma warning(error : 4701)   // warning C4700: (level 4) local variable 'name' may be used without having been initialized
00187 
00188 // temporary
00189     #pragma warning( disable : 4251 )// needs to have dll-interface to be used by clients of class
00190 
00191     #if (_MSC_VER <= 1200) // VC6
00192         #pragma warning( disable : 4786 )// identifier was truncated to '255' characters in the debug information
00193     #endif
00194 #endif
00195 
00196 #if defined(KARCH_DEV_MIPSPRO) || defined(KARCH_DEV_MIPS)
00197     #pragma set woff 1355 // The extra semicolon (";") is ignored.
00198     #pragma set woff 1682 //The overloaded virtual function "" is only partially overridden in class
00199     #pragma set woff 1681 //virtual function mix
00200     #pragma set woff 1183 //signed/unsigned mismatch
00201     
00202 #endif
00203 
00204 #define K_LOCAL_CLASS
00205 
00206 // Deprecated macro, to remind people to stop using certain functions
00207 
00208 #if defined(KARCH_DEV_GNUC) || defined(KARCH_DEV_GNUC_MACOSX) || defined(KARCH_DEV_GNUC_EE) // GNU compiler
00209     #define K_DEPRECATED __attribute__((deprecated))
00210 
00211 #elif defined(KARCH_DEV_INTEL) // Intel compiler
00212     #if (__INTEL_COMPILER >= 810) // Maybe we could use an earlier version, we should check this some day
00213         #define K_DEPRECATED __declspec(deprecated)
00214     #else
00215         #define K_DEPRECATED
00216     #endif
00217 
00218 #elif defined(KARCH_DEV_MSC) // Microsoft compiler
00219     #if (_MSC_VER >= 1300) // 7.1
00220         #define K_DEPRECATED __declspec(deprecated)
00221     #else
00222         #define K_DEPRECATED
00223     #endif
00224 
00225 #elif defined(KARCH_DEV_MIPSPRO) || defined(KARCH_DEV_MIPS) // SGI compiler
00226     #define K_DEPRECATED
00227 
00228 #elif defined(KARCH_DEV_MACOSX) // Metrowerks compiler
00229     #define K_DEPRECATED
00230 
00231 #else // Unknown compiler
00232     #define K_DEPRECATED
00233 
00234 #endif
00235 
00236 
00237 #endif // FBXFILESDK_COMPONENTS_KBASELIB_KAYDARA_H
00238