00001
00002
00144 #ifndef ADH_port_h
00145 #define ADH_port_h
00146
00147
00148 #undef CLOSE_namespace
00149 #undef USING_namespace
00150 #undef OPEN_namespace
00151
00153 #define OPEN_namespace(N) namespace N {
00154
00156 #define CLOSE_namespace(N) }
00157
00159 #define USING_namespace(N) using namespace N
00160
00161
00162 #undef CLOSE_namespace
00163 #undef USING_namespace
00164 #undef OPEN_namespace
00165
00166 #ifdef DOXYGEN_COMMENT // Documentados acá para Doxygen
00167
00168 namespace std {}
00170 namespace ADH {}
00171 #define INCLUDE_fstream Truco para "include <fstream>" portable
00172 #define INCLUDE_io Truco para "include <io>" portable
00173 #define INCLUDE_iomanip Truco para "include <iomanip>" portable
00174 #define INCLUDE_iostream Truco para "include <iostream>" portable
00175 #define INCLUDE_list Truco para "include <list>" portable
00176 #define INCLUDE_map Truco para "include <map>" portable
00177 #define INCLUDE_stdexcept Truco para "include <stdexcept>" portable
00178 #define INCLUDE_vector Truco para "include <vector>" portable
00179 #endif
00180
00181
00182 #ifdef __BORLANDC__
00183 #if (__BORLANDC__ <= 0x0410) // Identifica a BC++ v3.1 y anterior
00184 #undef false
00185 #undef true
00186 #undef bool
00187
00188
00189 typedef int bool;
00190 const int false = 0;
00191 const int true = ! false;
00192
00193 class istream; class ostream;
00194
00195 #define using // BC++ v3.1 NO tiene "namespace"
00196 #define namespace
00197 #define std
00198 #define ADH
00199
00200 #define OPEN_namespace(N) // BC++ v3.1 NO tiene "namespace"
00201 #define CLOSE_namespace(N)
00202 #define USING_namespace(N)
00203
00204 #ifdef INCLUDE_fstream
00205 #include <fstream.h>
00206 #endif
00207 #ifdef INCLUDE_io
00208 #include <io.h>
00209 #endif
00210 #ifdef INCLUDE_iomanip
00211 #include <iomanip.h>
00212 #endif
00213 #ifdef INCLUDE_iostream
00214 #include <iostream.h>
00215 #endif
00216 #ifdef INCLUDE_list
00217 #include <list.h>
00218 #endif
00219 #ifdef INCLUDE_map
00220 #include <map.h>
00221 #endif
00222 #ifdef INCLUDE_set
00223 #include <set.h>
00224 #endif
00225 #ifdef INCLUDE_stdexcept
00226 #include <stdexcept.h>
00227 #endif
00228 #ifdef INCLUDE_string
00229 #include <string.h>
00230 #endif
00231 #ifdef INCLUDE_vector
00232 #include <vector.h>
00233 #endif
00234 #endif
00235
00236 #if (__BORLANDC__ > 0x0410) // Versiones posteriores a BC++ v3.1
00237 #define OPEN_namespace(N) namespace N {
00238 #define CLOSE_namespace(N) }
00239 #define USING_namespace(N) using namespace N
00240 #error Ajuste ADH_port.h para compìlar con versiones nuevas de BC++
00241 #endif
00242 #endif
00243
00244
00245 #ifdef _MSC_VER
00246 // namespace
00247 #define OPEN_namespace(N) namespace N {
00248 #define CLOSE_namespace(N) }
00249 #define USING_namespace(N) using namespace N
00250
00251 #if (_MSC_VER >= 1300) // Identifica a VC++ .net
00252
00253 namespace std {}
00254 using namespace std;
00255
00256 #ifdef INCLUDE_fstream
00257 #include <fstream>
00258 #endif
00259 #ifdef INCLUDE_io
00260 #include <io>
00261 #endif
00262 #ifdef INCLUDE_iomanip
00263 #include <iomanip>
00264 #endif
00265 #ifdef INCLUDE_iostream
00266 #include <iostream>
00267 #endif
00268 #ifdef INCLUDE_list
00269 #include <list>
00270 #endif
00271 #ifdef INCLUDE_map
00272 #include <map>
00273 #endif
00274 #ifdef INCLUDE_set
00275 #include <set>
00276 #endif
00277 #ifdef INCLUDE_stdexcept
00278 #include <stdexcept>
00279 #endif
00280 #ifdef INCLUDE_string
00281 #include <string>
00282 #endif
00283 #ifdef INCLUDE_vector
00284 #include <vector>
00285 #endif
00286 #endif
00287
00288 #if (_MSC_VER < 1300) // Identifica a VC++ v6 y anterior
00289 namespace std {}
00290 using namespace std;
00291
00292 #ifdef INCLUDE_fstream
00293 #include <fstream.h>
00294 #endif
00295 #ifdef INCLUDE_io
00296 #include <io.h>
00297 #endif
00298 #ifdef INCLUDE_iomanip
00299 #include <iomanip.h>
00300 #endif
00301 #ifdef INCLUDE_iostream
00302 #include <iostream.h>
00303 #endif
00304 #ifdef INCLUDE_list
00305 #include <list.h>
00306 #endif
00307 #ifdef INCLUDE_map
00308 #include <map.h>
00309 #endif
00310 #ifdef INCLUDE_set
00311 #include <set.h>
00312 #endif
00313 #ifdef INCLUDE_stdexcept
00314 #include <stdexcept.h>
00315 #endif
00316 #ifdef INCLUDE_string
00317 #include <string.h>
00318 #endif
00319 #ifdef INCLUDE_vector
00320 #include <vector.h>
00321 #endif
00322 #endif
00323 #endif
00324
00325 #endif // ADH_port_h
00326
00327