libFAUDES

Sections

Index

cfl_definitions.h

Go to the documentation of this file.
00001 /** @file cfl_definitions.h 
00002 
00003 Compiletime options. This file configures the runtime bahaviour of
00004 libFAUDES, in particular informative output on stderr and stdout; see
00005 also the Makefile.
00006 
00007 */
00008 
00009 
00010 /* FAU Discrete Event Systems Library (libfaudes)
00011 
00012    Copyright (C) 2006  Bernd Opitz
00013    Copyright (C) 2008  Thomas Moor
00014    Exclusive copyright is granted to Klaus Schmidt
00015 
00016    This library is free software; you can redistribute it and/or
00017    modify it under the terms of the GNU Lesser General Public
00018    License as published by the Free Software Foundation; either
00019    version 2.1 of the License, or (at your option) any later version.
00020 
00021    This library is distributed in the hope that it will be useful,
00022    but WITHOUT ANY WARRANTY; without even the implied warranty of
00023    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024    Lesser General Public License for more details.
00025 
00026    You should have received a copy of the GNU Lesser General Public
00027    License along with this library; if not, write to the Free Software
00028    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00029 
00030 
00031 
00032 #ifndef FAUDES_DEFINITIONS_H
00033 #define FAUDES_DEFINITIONS_H
00034 
00035 #include "configuration.h"
00036 
00037 #include <sstream>
00038 #include <iostream>
00039 
00040 namespace faudes {
00041 
00042 /** Type definition for index type */
00043 typedef long unsigned int Idx;
00044 
00045 /** Type definition for signed index type */
00046 typedef long int SignedIdx;
00047 
00048 /** Length of strings for text fields in token output*/
00049 #define FD_NAMELEN 13
00050 
00051 /** Max length of automatic container names (set to -1 for unlimited) */
00052 #define FD_MAXCONTAINERNAME 70
00053 
00054 /** Max size of transrel for state name output */
00055 #define FD_SMALLTRANSREL 100
00056 
00057 /** Min number of states to use consecutive section in file output */
00058 #define FD_CONSECUTIVE 6
00059 
00060 /** Max number of automatic signatures */
00061 #define FD_RTIMAXSIG 5
00062 
00063 #ifndef FAUDES_VERSION
00064 /** Fallback version string (should define version in Makefile) */
00065 #define FAUDES_VERSION "undefined version"
00066 #endif
00067 
00068 /** Debug: output macro for redirection to file */
00069 #define FAUDES_WRITE_CONSOLE(message) \
00070   { ConsoleOut::G()->Buffer() << message << std::endl ; ConsoleOut::G()->Flush();}
00071 
00072 /** Debug: always report warnings */
00073 #define FD_WARN(message) FAUDES_WRITE_CONSOLE("FAUDES_WARNING:   " << message)
00074 
00075 /** Debug: report more errors with file/line info */
00076 #ifdef FAUDES_DEBUG_CODE
00077 #define FD_ERR(message) \
00078  FAUDES_WRITE_CONSOLE("FAUDES_CODE: "  << message << " in " << __FILE__ << ":" << __LINE__ )
00079 #else
00080 #define FD_ERR(message)
00081 #endif
00082 
00083 /** Debug: optional write progress report to console */
00084 #ifdef FAUDES_WRITE_PROGRESS 
00085 #define FD_WP(message) {FAUDES_WRITE_CONSOLE("FAUDES_PROGRESS:  " << message); LoopCallback();}
00086 #else
00087 #define FD_WP(message)
00088 #endif
00089 
00090 /** Debug: optional report on user functions */
00091 #ifdef FAUDES_DEBUG_FUNCTION
00092 #define FD_DF(message)  FAUDES_WRITE_CONSOLE("FAUDES_FUNCTION:  " << message)
00093 #else
00094 #define FD_DF(message)
00095 #endif
00096 
00097 
00098 /** Debug: optional report on generator operations */
00099 #ifdef FAUDES_DEBUG_GENERATOR
00100 #define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message)
00101 #else
00102 #define FD_DG(message)
00103 #endif
00104 
00105 /** Debug: optional report on container operations */
00106 #ifdef FAUDES_DEBUG_CONTAINER
00107 #define FD_DC(message) FAUDES_WRITE_CONSOLE("FAUDES_CONTAINER: " << message)
00108 #else
00109 #define FD_DC(message)
00110 #endif
00111 
00112 /** Debug: optional report on runtime-interface operations */
00113 #ifdef FAUDES_DEBUG_RUNTIMEINTERFACE
00114 #define FD_DRTI(message) FAUDES_WRITE_CONSOLE("FAUDES_RTI:     " << message)
00115 #else
00116 #define FD_DRTI(message)
00117 #endif
00118 
00119 /** Debug: optional low-level report on iterations and  token IO */
00120 #ifdef FAUDES_DEBUG_VERBOSE
00121 #define FD_DV(message) FAUDES_WRITE_CONSOLE("FAUDES_VERBOSE:   " <<  message)
00122 #else
00123 #define FD_DV(message)
00124 #endif
00125 
00126 /** Debug: count objects, report on exit */
00127 #ifdef FAUDES_DEBUG_CODE
00128 #define FAUDES_OBJCOUNT_INC(type) ObjectCount::Inc(type)
00129 #define FAUDES_OBJCOUNT_DEC(type) ObjectCount::Dec(type)
00130 #else
00131 #define FAUDES_OBJCOUNT_INC(type)
00132 #define FAUDES_OBJCOUNT_DEC(type)
00133 #endif
00134 
00135 /** Tutorial/debugging mark */
00136 #define FD_DLINE(message) FD_WARN( \
00137   std::endl << "################################################ " << \
00138   std::endl << message << " at file " << __FILE__ << ", line " << __LINE__ << endl << \
00139   std::endl << "################################################ " << std::endl );
00140 
00141 
00142 /** Doxygen: exclude this from doxygen */
00143 #ifndef FAUDES_DOXYGEN
00144 #define FAUDES_NODOC(a) a
00145 #else
00146 #define FAUDES_NODOC(a)
00147 #endif
00148 
00149 /* Doxygen: include group definitions */
00150 #ifdef FAUDES_DOXYGEN
00151 #include "doxygen_groups.h"
00152 #endif
00153 
00154 } // namespace faudes
00155 
00156 #endif 
00157 

libFAUDES 2.16b --- 2010-9-8 --- c++ source docu by doxygen 1.6.3