CoreLinux++  0.4.32
Common.hpp
1 #if !defined (__COMMON_HPP)
2 #define __COMMON_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 
31 // Used by the component headers to determine
32 // that they are indeed being included by
33 // Common.hpp
34 
35 #define IN_COMMON_HPP
36 
37 //
38 // Some standard information
39 //
40 
41 // TEXT identifies that the following text
42 // string may be either UNICODE or ANSI
43 //
44 // TEXT("The quick brown fox jumped over the lazy dog!")
45 //
46 // will make the string UNICODE charactes if __UNICODE is defined
47 // and ANSI characters if not.
48 
49 #if defined( __UNICODE )
50  #if defined(__GNUC__)
51  #include <wchar.h>
52  #define _STDTEXT(text) L##text
53  #else
54  #define _STDTEXT(text) text
55  #endif
56 #else
57  #define _STDTEXT(text) text
58 #endif
59 
60 #define TEXT(text) _STDTEXT(text)
61 
62 #define __STDFILE__ TEXT( __FILE__ )
63 
64 
71 #define LOCATION __STDFILE__, __LINE__
72 
80 #define IGNORE_RETURN (void)
81 
90 #define DECLARE_TYPE( mydecl, mytype ) \
91 typedef mydecl mytype; \
92 typedef mytype * mytype ## Ptr; \
93 typedef const mytype * mytype ## Cptr; \
94 typedef mytype & mytype ## Ref; \
95 typedef const mytype & mytype ## Cref;
96 
105 #define DECLARE_CLASS( tag ) \
106  class tag; \
107  typedef tag * tag ## Ptr; \
108  typedef const tag * tag ## Cptr; \
109  typedef tag & tag ## Ref; \
110  typedef const tag & tag ## Cref;
111 
113 
114 #define CORELINUX( tag ) \
115  corelinux::tag
116 
118 
119 namespace corelinux
120 {
121  DECLARE_CLASS( CoreLinuxObject ); // Base class
122  DECLARE_CLASS( AbstractString ); // Dispatching virtual
123  DECLARE_CLASS( StringUtf8 ); // Utf8 Implementation
124  DECLARE_CLASS( Exception ); // Basic Exception *temporary!!!
125  DECLARE_CLASS( NullPointerException ); // NullPointerException
126  DECLARE_CLASS( Assertion ); // Thank you B. Meyers
127  DECLARE_CLASS( Synchronized ); //
128  DECLARE_CLASS( Thread ); //
129  DECLARE_CLASS( SemaphoreGroup ); //
130  DECLARE_CLASS( AbstractInteger ); //
131  DECLARE_CLASS( AbstractReal ); //
132 }
133 
134 #include <cstddef> // size_t, wchar_t, NULL
135 #include <cstring>
136 
137 // Non class types. Must be the first
138 // include file in this module.
139 
140 #include <Types.hpp>
141 
142 // Size and value limits for the types in
143 // types.hpp
144 
145 #include <Limits.hpp>
146 
147 // Common class types.
148 
149 #include <Exception.hpp> // Class Exception
150 #include <CoreLinuxObject.hpp> // Base support class
151 #include <AbstractString.hpp> // Base Abstraction *temp!!!
152 #include <StringUtf8.hpp> // CoreLinux++ Default String
153 #include <NullPointerException.hpp> // NullPointerException
154 #include <Assertion.hpp> // Class Assertion
155 #include <AccessRights.hpp> // General Access Settings
156 #include <Identifier.hpp> // Base Identifier
157 #include <ScalarIdentifiers.hpp> // Various identifiers
158 #include <Synchronized.hpp>
159 #include <Thread.hpp>
160 #include <Environment.hpp>
161 
162 //#include <AbstractException.hpp>
163 //#include <AbstractSubject.hpp>
164 //#include <AbstractObserver.hpp>
165 //#include <AbstractInteger.hpp>
166 //#include <AbstractReal.hpp>
167 // Pre-included collections (STL)
168 
169 #if defined(__INCLUDE_COLLECTIONS)
170 #include <Pair.hpp>
171 #include <List.hpp>
172 #include <Queue.hpp>
173 #include <Stack.hpp>
174 #include <Vector.hpp>
175 #include <Map.hpp>
176 #include <Set.hpp>
177 #endif
178 
179 
180 // Do not add code after the next line.
181 
182 #undef IN_COMMON_HPP
183 
184 #endif // !defined __COMMON_HPP
185 
186 /*
187  Common rcs information do not modify
188  $Author: prudhomm $
189  $Revision: 1.7 $
190  $Date: 2000/08/31 22:52:20 $
191  $Locker: $
192 */
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 

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