lugre_prefix.h

Go to the documentation of this file.
00001 /*
00002 http://www.opensource.org/licenses/mit-license.php  (MIT-License)
00003 
00004 Copyright (c) 2007 Lugre-Team
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is
00011 furnished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00019 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00020 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00021 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00022 THE SOFTWARE.
00023 */
00024 #ifndef LUGRE_PREFIX_H
00025 #define LUGRE_PREFIX_H
00026 
00027 #include "lugre_platform.h"
00028 
00029 #include <assert.h>
00030 #define ASSERT(x) assert(x)
00031 #include "lugre_profile.h"
00032 
00033 #ifndef LUGRE_REDUCE_C_INCLUDES
00034     #include <stdlib.h>
00035     #include <stdio.h>
00036     #include <string.h>
00037     #include <cstring>
00038 #endif
00039 
00040 namespace Lugre {
00041     
00042 int     mystricmp   (const char *str1, const char *str2);   
00043 float   myround     (const float x);                        
00044 
00045 void    MyCrash     (const char* szMessage); 
00046 void    MyCrash     (const char* szMessage,const char* szFile,unsigned int iLine,const char* szFunction); 
00047 void    MyShowError     (const char* szMessage); 
00048 void    MyShowError     (const char* szMessage,const char* szFile,unsigned int iLine,const char* szFunction); 
00049     
00050 bool    Lugre_IsMainThread ();
00051     
00052 template<typename T1, typename T2> inline T1 myabs(T1 a){return (a>0?a:-a);}
00053 template<typename T1, typename T2> inline T1 mymax(T1 a,T2 b){return (a<b?b:a);}
00054 template<typename T1, typename T2> inline T1 mymin(T1 a,T2 b){return (a>b?b:a);}
00055 template<typename T1> inline T1 mysquare(T1 a){return a*a;}
00056 
00058 void    printdebug  (const char *szCategory, const char *szFormat = "", ...);
00059 
00060 }
00061 
00062 #endif

Generated on Wed Feb 8 06:00:12 2012 for cpp by  doxygen 1.5.6