|
libFAUDES
Sections
Index
|
cfl_definitions.hGo 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 or application */ 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 or application */ 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 write progress report to console or application, incl count */ 00091 #ifdef FAUDES_WRITE_PROGRESS 00092 #define FD_WPC(cntnow, cntdone, message) \ 00093 { ConsoleOut::G()->Buffer() << "FAUDES_PROGRESS: " << message << std::endl ; ConsoleOut::G()->Flush(cntnow,cntdone); LoopCallback(); } 00094 #else 00095 #define FD_WPC(cntnow, contdone, message) 00096 #endif 00097 00098 /** Debug: optional report on user functions */ 00099 #ifdef FAUDES_DEBUG_FUNCTION 00100 #define FD_DF(message) FAUDES_WRITE_CONSOLE("FAUDES_FUNCTION: " << message) 00101 #else 00102 #define FD_DF(message) 00103 #endif 00104 00105 00106 /** Debug: optional report on generator operations */ 00107 #ifdef FAUDES_DEBUG_GENERATOR 00108 #define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message) 00109 #else 00110 #define FD_DG(message) 00111 #endif 00112 00113 /** Debug: optional report on container operations */ 00114 #ifdef FAUDES_DEBUG_CONTAINER 00115 #define FD_DC(message) FAUDES_WRITE_CONSOLE("FAUDES_CONTAINER: " << message) 00116 #else 00117 #define FD_DC(message) 00118 #endif 00119 00120 /** Debug: optional on function and type definition */ 00121 #ifdef FAUDES_DEBUG_RUNTIMEINTERFACE 00122 #define FD_DRTI(message) FAUDES_WRITE_CONSOLE("FAUDES_RTI: " << message) 00123 #else 00124 #define FD_DRTI(message) 00125 #endif 00126 00127 /** Debug: optional report registry operations */ 00128 #ifdef FAUDES_DEBUG_REGISTRY 00129 #define FD_DREG(message) FAUDES_WRITE_CONSOLE("FAUDES_REG: " << message) 00130 #else 00131 #define FD_DREG(message) 00132 #endif 00133 00134 /** Debug: optional low-level report on iterations and token IO */ 00135 #ifdef FAUDES_DEBUG_VERBOSE 00136 #define FD_DV(message) FAUDES_WRITE_CONSOLE("FAUDES_VERBOSE: " << message) 00137 #else 00138 #define FD_DV(message) 00139 #endif 00140 00141 /** Debug: count objects, report on exit */ 00142 #ifdef FAUDES_DEBUG_CODE 00143 #define FAUDES_OBJCOUNT_INC(type) ObjectCount::Inc(type) 00144 #define FAUDES_OBJCOUNT_DEC(type) ObjectCount::Dec(type) 00145 #else 00146 #define FAUDES_OBJCOUNT_INC(type) 00147 #define FAUDES_OBJCOUNT_DEC(type) 00148 #endif 00149 00150 /** Tutorial/debugging mark */ 00151 #define FD_DLINE(message) FD_WARN( \ 00152 std::endl << "################################################ " << \ 00153 std::endl << message << " at file " << __FILE__ << ", line " << __LINE__ << endl << \ 00154 std::endl << "################################################ " << std::endl ); 00155 00156 00157 /** Doxygen: exclude this from doxygen */ 00158 #ifndef FAUDES_DOXYGEN 00159 #define FAUDES_NODOC(a) a 00160 #else 00161 #define FAUDES_NODOC(a) 00162 #endif 00163 00164 /* Doxygen: include group definitions */ 00165 #ifdef FAUDES_DOXYGEN 00166 #include "doxygen_groups.h" 00167 #endif 00168 00169 } // namespace faudes 00170 00171 #endif 00172 |
libFAUDES 2.18b --- 2010-12-17 --- c++ source docu by doxygen 1.6.3