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: console output, no redirection */ 00069 #define FAUDES_WRITE_DIRECT(message) \ 00070 { std::cout << message << std::endl; } 00071 00072 /** Debug: output macro for optional redirection of all console output */ 00073 #define FAUDES_WRITE_CONSOLE(message) \ 00074 { std::ostringstream cfl_line; cfl_line << message << std::endl; ConsoleOut::G()->Write(cfl_line.str()); } 00075 00076 /** Debug: always report warnings */ 00077 #define FD_WARN(message) FAUDES_WRITE_CONSOLE("FAUDES_WARNING: " << message) 00078 00079 /** Debug: report more errors with file/line info */ 00080 #ifdef FAUDES_DEBUG_CODE 00081 #define FD_ERR(message) \ 00082 FAUDES_WRITE_CONSOLE("FAUDES_CODE: " << message << " in " << __FILE__ << ":" << __LINE__ ) 00083 #else 00084 #define FD_ERR(message) 00085 #endif 00086 00087 /** Debug: optional write progress report to console or application */ 00088 #ifdef FAUDES_WRITE_PROGRESS 00089 #define FD_WP(message) {FAUDES_WRITE_CONSOLE("FAUDES_PROGRESS: " << message); LoopCallback();} 00090 #else 00091 #define FD_WP(message) 00092 #endif 00093 00094 /** Debug: optional write progress report to console or application, incl count */ 00095 #ifdef FAUDES_WRITE_PROGRESS 00096 #define FD_WPC(cntnow, cntdone, message) \ 00097 { std::ostringstream cfl_line; cfl_line << "FAUDES_PROGRESS: " << message << std::endl; ConsoleOut::G()->Write(cfl_line.str(),(cntnow),(cntdone)); LoopCallback(); } 00098 #else 00099 #define FD_WPC(cntnow, contdone, message) 00100 #endif 00101 00102 /** Debug: optional report on user functions */ 00103 #ifdef FAUDES_DEBUG_FUNCTION 00104 #define FD_DF(message) FAUDES_WRITE_CONSOLE("FAUDES_FUNCTION: " << message) 00105 #else 00106 #define FD_DF(message) 00107 #endif 00108 00109 00110 /** Debug: optional report on generator operations */ 00111 #ifdef FAUDES_DEBUG_GENERATOR 00112 #define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message) 00113 #else 00114 #define FD_DG(message) 00115 #endif 00116 00117 /** Debug: optional report on container operations */ 00118 #ifdef FAUDES_DEBUG_CONTAINER 00119 #define FD_DC(message) FAUDES_WRITE_CONSOLE("FAUDES_CONTAINER: " << message) 00120 #else 00121 #define FD_DC(message) 00122 #endif 00123 00124 /** Debug: optional on function and type definition */ 00125 #ifdef FAUDES_DEBUG_RUNTIMEINTERFACE 00126 #define FD_DRTI(message) FAUDES_WRITE_CONSOLE("FAUDES_RTI: " << message) 00127 #else 00128 #define FD_DRTI(message) 00129 #endif 00130 00131 /** Debug: optional report registry operations */ 00132 #ifdef FAUDES_DEBUG_REGISTRY 00133 #define FD_DREG(message) FAUDES_WRITE_CONSOLE("FAUDES_REG: " << message) 00134 #else 00135 #define FD_DREG(message) 00136 #endif 00137 00138 /** Debug: optional low-level report on iterations and token IO */ 00139 #ifdef FAUDES_DEBUG_VERBOSE 00140 #define FD_DV(message) FAUDES_WRITE_CONSOLE("FAUDES_VERBOSE: " << message) 00141 #else 00142 #define FD_DV(message) 00143 #endif 00144 00145 /** Debug: count objects, report on exit */ 00146 #ifdef FAUDES_DEBUG_CODE 00147 #define FAUDES_OBJCOUNT_INC(type) ObjectCount::Inc(type) 00148 #define FAUDES_OBJCOUNT_DEC(type) ObjectCount::Dec(type) 00149 #else 00150 #define FAUDES_OBJCOUNT_INC(type) 00151 #define FAUDES_OBJCOUNT_DEC(type) 00152 #endif 00153 00154 /** Tutorial/debugging mark */ 00155 #define FD_DLINE(message) FD_WARN( \ 00156 std::endl << "################################################ " << \ 00157 std::endl << message << " at file " << __FILE__ << ", line " << __LINE__ << endl << \ 00158 std::endl << "################################################ " << std::endl ); 00159 00160 00161 /** Doxygen: exclude this from doxygen */ 00162 #ifndef FAUDES_DOXYGEN 00163 #define FAUDES_NODOC(a) a 00164 #else 00165 #define FAUDES_NODOC(a) 00166 #endif 00167 00168 /* Doxygen: include group definitions */ 00169 #ifdef FAUDES_DOXYGEN 00170 #include "doxygen_groups.h" 00171 #endif 00172 00173 } // namespace faudes 00174 00175 #endif 00176 |
libFAUDES 2.20s --- 2011.10.12 --- c++ source docu by doxygen