CoreLinux++  0.4.32
Types.hpp
1 #if !defined (__TYPES_HPP)
2 #define __TYPES_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 1999 CoreLinux Consortium
7 
8  The CoreLinux++ Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  The CoreLinux++ Library Library is distributed in the hope that it will
14  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public
19  License along with the GNU C Library; see the file COPYING.LIB. If not,
20  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA 02111-1307, USA.
22 */
23 
24 
25 #if !defined IN_COMMON_HPP
26 #error Types.hpp is included via Common.hpp only.
27 #endif
28 
29 namespace corelinux
30 {
31 
38  #if !defined( __UNICODE )
39  DECLARE_TYPE( char, Char ); // non-Unicode character.
40  #else
41  DECLARE_TYPE( wchar_t, Char ); // Unicode character
42  #endif
43 
44  DECLARE_TYPE( wchar_t, Wchar ); // Wide character.
45 
46  // *******************************************
47  // Signed Integral Types
48  // *******************************************
49 
50  DECLARE_TYPE( short int, Short ); // 16 bits.
51  DECLARE_TYPE( long int, Long ); // 32 bits.
52  DECLARE_TYPE( int, Int ); // Compiler Depend
53  DECLARE_TYPE( unsigned int, UnsignedInt ); //
54 
55  // *******************************************
56  // Unsigned Integral Types
57  // *******************************************
58 
59  DECLARE_TYPE( unsigned char, Byte ); // 8 Bits.
60  DECLARE_TYPE( unsigned short, Word ); // 16 Bits.
61  DECLARE_TYPE( unsigned long, Dword ); // 32 Bits.
62 
63  // *******************************************
64  // Floating Point.
65  // *******************************************
66 
67  DECLARE_TYPE( double, Real );
68 
69  // *******************************************
70  // Define the void pointer type.
71  // *******************************************
72 
73  typedef void * VoidPtr;
74 
75  // *******************************************
76  // Define the NULLPTR
77  // *******************************************
78 
79  #define NULLPTR 0
80 
81  // *******************************************
82  // Miscellaneous
83  // *******************************************
84 
85  DECLARE_TYPE( size_t, Size ); // The size of an object.
86  DECLARE_TYPE( Dword, Index ); // Array or loop index.
87  DECLARE_TYPE( Long, Counter ); // A signed counting type.
88  DECLARE_TYPE( Word, ResID ); // Resource or message id.
89 
90  DECLARE_TYPE( Dword, Count );
91 
92  // *******************************************
93  // Operating System Handles and ids.
94  // *******************************************
95 
96  DECLARE_TYPE( VoidPtr, Handle );
97 
98  // **********************************************
99  // Define MessageID as a Dword for OS::STDMESSAGE
100  // message identifiers.
101  // **********************************************
102 
103  DECLARE_TYPE( Dword, MessageID );
104 
105 }
106 
107 #endif // !defined __TYPES_HPP
108 
109 /*
110  Common rcs information do not modify
111  $Author: frankc $
112  $Revision: 1.2 $
113  $Date: 2000/05/25 04:26:14 $
114  $Locker: $
115 */
116 

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium