basisdef.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2006 SCHUNK GmbH & Co. KG
00003  * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *   http://www.apache.org/licenses/LICENSE-2.0
00010 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 //======================================================================
00047 //======================================================================
00048 
00049 #ifndef _SDHLIBRARY_BASISDEF_H
00050 #define _SDHLIBRARY_BASISDEF_H
00051 
00052 //----------------------------------------------------------------------
00053 // Project includes
00054 //----------------------------------------------------------------------
00055 
00056 #include <assert.h>
00057 #include "sdhlibrary_settings.h"
00058 
00059 
00060 //----------------------------------------------------------------------
00061 // Typedefs
00062 //----------------------------------------------------------------------
00063 
00064 NAMESPACE_SDH_START
00065 
00066 #if SDH_USE_VCC
00067 // MS visual C++ does not provide stdint.h
00068 typedef __int8           Int8;        
00069 typedef unsigned __int8  UInt8;       
00070 typedef __int16          Int16;       
00071 typedef unsigned __int16 UInt16;      
00072 typedef __int32          Int32;       
00073 typedef unsigned __int32 UInt32;      
00074 #else
00075 // using the typenames from stdint.h should work even on 64-Bit systems...
00076 #include <stdint.h>
00077 typedef int8_t           Int8;        
00078 typedef uint8_t          UInt8;       
00079 typedef int16_t          Int16;       
00080 typedef uint16_t         UInt16;      
00081 typedef int32_t          Int32;       
00082 typedef uint32_t         UInt32;      
00083 #endif
00084 
00085 //----------------------------------------------------------------------
00086 // defines
00087 //----------------------------------------------------------------------
00088 
00090 #define SDH_ASSERT_TYPESIZES()              \
00091     do {                                    \
00092         assert( sizeof( Int8 )   == 1 );    \
00093         assert( sizeof( UInt8 )  == 1 );    \
00094         assert( sizeof( Int16 )  == 2 );    \
00095         assert( sizeof( UInt16 ) == 2 );    \
00096         assert( sizeof( Int32 )  == 4 );    \
00097         assert( sizeof( UInt32 ) == 4 );    \
00098     } while (0)
00099 
00100 
00101 NAMESPACE_SDH_END
00102 
00103 //======================================================================
00104 #endif


schunk_sdh
Author(s): Mathias Luedtke , Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:21