Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

defs.h

00001 // $Id: defs_8h-source.html,v 1.2 2002/06/20 17:09:52 mkrohn5 Exp $
00002 
00003 // Definitions Header File
00004 
00005 // Copyright (C) 1999 - 2001, Marco Krohn, marco.krohn@gmx.de
00006 //
00007 // This program is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 1, or (at your option)
00010 // any later version.
00011 //
00012 // This program is distrqibuted in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 
00017 #ifndef __DEFS_INCLUDED
00018 #define __DEFS_INCLUDED
00019 
00020 
00021 
00022 
00023 
00024 //----------------------------------------  Defines  ----------------------------------------
00025 
00026 #ifdef HAVE_CONFIG_H                                       // for unix systems only
00027   #include "../config.h"
00028   #define OS_UNIX
00029 #else                                                      // windows
00030   #define VERSION "0.1.2"
00031   #define PACKAGE "stellarlegacy"
00032   #define OS_WINDOWS
00033 #endif
00034 
00035 // This will enable additional checks which make the application slower
00036 // but severe bugs are easier to find. For example this will enable a check
00037 // which checks if an element is added twice to a list by accident.
00038 // Another check that is activated is the "leakchecker" class.
00039 #define SECURE_MODE
00040 
00041 #define LOG_ENABLED                                        // comment if you don't want to have a lock file
00042 
00043 
00044 
00045 #ifdef LOG_ENABLED                                         // switch on the log system
00046   #include <fstream>
00047 
00048   // see global.cpp
00049   extern int iIndentNumber;
00050   extern std::ofstream* logout;                            // the output stream
00051 
00052   #define LOG(x,y)             if ( logout == 0 ) logout = new ofstream("log.out"); \
00053                                *logout << ":::" << x << ", " << y << ", normal, " << iIndentNumber << ", "
00054   #define WLOG(x,y)            if ( logout == 0 ) logout = new ofstream("log.out"); \
00055                                *logout << ":::" << x << ", " << y << ", warning, " << iIndentNumber << ", "
00056   #define ELOG(x,y)            if ( logout == 0 ) logout = new ofstream("log.out"); \
00057                                *logout << ":::" << x << ", " << y << ", error, " << iIndentNumber << ", "
00058   #define LOG_BEGIN_INDENT();  iIndentNumber++;
00059   #define LOG_END_INDENT();    if ( iIndentNumber > 0 )  iIndentNumber--;
00060 #else                                                      // all log output to stderr
00061   #define LOG(x,y)             cerr << x << ", " << y << ", normal, "
00062   #define LOG_BEGIN_INDENT();  ;
00063   #define LOG_END_INDENT();    ;
00064   #define WLOG(x,y)            cerr << x << ", " << y << ", warning, "
00065   #define ELOG(x,y)            cerr << x << ", " << y << ", error, "
00066 #endif
00067 
00068 
00069 
00070 
00071 
00072 //----------------------------------------  Constants  ----------------------------------------
00073 
00074 const int FAILED = -1;
00075 
00076 
00077 
00078 
00079 
00080 //----------------------------------------  Type Definitions  ----------------------------------------
00081 
00082 typedef unsigned char byte;
00087 typedef short int int2;
00088 typedef long int int4;
00089 typedef unsigned short int uint2;
00090 typedef unsigned long int uint4;
00091 
00092 
00093 
00094 
00095 
00096 #endif        // __DEFS_INCLUDED

Generated on Thu Jun 20 18:13:15 2002 for Stellar Legacy by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001