00001 #if !defined (__TYPES_HPP)
00002 #define __TYPES_HPP
00003
00004 /*
00005 CoreLinux++
00006 Copyright (C) 1999 CoreLinux Consortium
00007
00008 The CoreLinux++ Library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public License as
00010 published by the Free Software Foundation; either version 2 of the
00011 License, or (at your option) any later version.
00012
00013 The CoreLinux++ Library Library is distributed in the hope that it will
00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016 Library General Public License for more details.
00017
00018 You should have received a copy of the GNU Library General Public
00019 License along with the GNU C Library; see the file COPYING.LIB. If not,
00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00021 Boston, MA 02111-1307, USA.
00022 */
00023
00024
00025 #if !defined IN_COMMON_HPP
00026 #error Types.hpp is included via Common.hpp only.
00027 #endif
00028
00029 namespace corelinux
00030 {
00031
00038 #if !defined( __UNICODE )
00039 DECLARE_TYPE( char, Char ); // non-Unicode character.
00040 #else
00041 DECLARE_TYPE( wchar_t, Char ); // Unicode character
00042 #endif
00043
00044 DECLARE_TYPE( wchar_t, Wchar ); // Wide character.
00045
00046 // *******************************************
00047 // Signed Integral Types
00048 // *******************************************
00049
00050 DECLARE_TYPE( short int, Short ); // 16 bits.
00051 DECLARE_TYPE( long int, Long ); // 32 bits.
00052 DECLARE_TYPE( int, Int ); // Compiler Depend
00053 DECLARE_TYPE( unsigned int, UnsignedInt ); //
00054
00055 // *******************************************
00056 // Unsigned Integral Types
00057 // *******************************************
00058
00059 DECLARE_TYPE( unsigned char, Byte ); // 8 Bits.
00060 DECLARE_TYPE( unsigned short, Word ); // 16 Bits.
00061 DECLARE_TYPE( unsigned long, Dword ); // 32 Bits.
00062
00063 // *******************************************
00064 // Floating Point.
00065 // *******************************************
00066
00067 DECLARE_TYPE( double, Real );
00068
00069 // *******************************************
00070 // Define the void pointer type.
00071 // *******************************************
00072
00073 typedef void * VoidPtr;
00074
00075 // *******************************************
00076 // Define the NULLPTR
00077 // *******************************************
00078
00079 #define NULLPTR 0
00080
00081 // *******************************************
00082 // Miscellaneous
00083 // *******************************************
00084
00085 DECLARE_TYPE( size_t, Size ); // The size of an object.
00086 DECLARE_TYPE( Dword, Index ); // Array or loop index.
00087 DECLARE_TYPE( Long, Counter ); // A signed counting type.
00088 DECLARE_TYPE( Word, ResID ); // Resource or message id.
00089
00090 DECLARE_TYPE( Dword, Count );
00091
00092 // *******************************************
00093 // Operating System Handles and ids.
00094 // *******************************************
00095
00096 DECLARE_TYPE( VoidPtr, Handle );
00097
00098 // **********************************************
00099 // Define MessageID as a Dword for OS::STDMESSAGE
00100 // message identifiers.
00101 // **********************************************
00102
00103 DECLARE_TYPE( Dword, MessageID );
00104
00105 }
00106
00107 #endif // !defined __TYPES_HPP
00108
00109 /*
00110 Common rcs information do not modify
00111 $Author: frankc $
00112 $Revision: 1.2 $
00113 $Date: 2000/05/25 04:26:14 $
00114 $Locker: $
00115 */
00116