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 00043 /** Type definition for index type */ 00044 typedef long unsigned int Idx; 00045 00046 /** Type definition for signed index type */ 00047 typedef long int SignedIdx; 00048 00049 /** Length of strings for text fields in token output*/ 00050 #define FD_NAMELEN 13 00051 00052 /** Max length of automatic container names (set to -1 for unlimited) */ 00053 #define FD_MAXCONTAINERNAME 70 00054 00055 /** Max size of transrel for state name output */ 00056 #define FD_SMALLTRANSREL 100 00057 00058 /** Min number of states to use consecutive section in file output */ 00059 #define FD_CONSECUTIVE 6 00060 00061 /** Max number of automatic signatures */ 00062 #define FD_RTIMAXSIG 5 00063 00064 #ifndef FAUDES_VERSION 00065 /** Fallback version string (should define version in Makefile) */ 00066 #define FAUDES_VERSION "undefined version" 00067 #endif 00068 00069 /** Debug: console output, no redirection */ 00070 #define FAUDES_WRITE_DIRECT(message) \ 00071 { if(!ConsoleOut::G()->Mute()) { std::cout << message << std::endl;} } 00072 00073 /** Debug: output macro for optional redirection of all console output */ 00074 #define FAUDES_WRITE_CONSOLE(message) \ 00075 { if(!ConsoleOut::G()->Mute()) { \ 00076 std::ostringstream cfl_line; cfl_line << message << std::endl; ConsoleOut::G()->Write(cfl_line.str());} } 00077 00078 /** Debug: always report warnings */ 00079 #define FD_WARN(message) FAUDES_WRITE_CONSOLE("FAUDES_WARNING: " << message) 00080 00081 /** Debug: report more errors with file/line info */ 00082 #ifdef FAUDES_DEBUG_CODE 00083 #define FD_ERR(message) \ 00084 FAUDES_WRITE_CONSOLE("FAUDES_CODE: " << message << " in " << __FILE__ << ":" << __LINE__ ) 00085 #else 00086 #define FD_ERR(message) 00087 #endif 00088 00089 /** Debug: optional write progress report to console or application */ 00090 #ifdef FAUDES_WRITE_PROGRESS 00091 #define FD_WP(message) {FAUDES_WRITE_CONSOLE("FAUDES_PROGRESS: " << message); LoopCallback();} 00092 #else 00093 #define FD_WP(message) 00094 #endif 00095 00096 /** Debug: optional write progress report to console or application, incl count */ 00097 #ifdef FAUDES_WRITE_PROGRESS 00098 #define FD_WPC(cntnow, cntdone, message) \ 00099 { std::ostringstream cfl_line; cfl_line << "FAUDES_PROGRESS: " << message << std::endl; \ 00100 ConsoleOut::G()->Write(cfl_line.str(),(cntnow),(cntdone)); LoopCallback(); } 00101 #else 00102 #define FD_WPC(cntnow, contdone, message) 00103 #endif 00104 00105 /** Debug: optional report on user functions */ 00106 #ifdef FAUDES_DEBUG_FUNCTION 00107 #define FD_DF(message) FAUDES_WRITE_CONSOLE("FAUDES_FUNCTION: " << message) 00108 #else 00109 #define FD_DF(message) 00110 #endif 00111 00112 00113 /** Debug: optional report on generator operations */ 00114 #ifdef FAUDES_DEBUG_GENERATOR 00115 #define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message) 00116 #else 00117 #define FD_DG(message) 00118 #endif 00119 00120 /** Debug: optional report on container operations */ 00121 #ifdef FAUDES_DEBUG_CONTAINER 00122 #define FD_DC(message) FAUDES_WRITE_CONSOLE("FAUDES_CONTAINER: " << message) 00123 #else 00124 #define FD_DC(message) 00125 #endif 00126 00127 /** Debug: optional on function and type definition */ 00128 #ifdef FAUDES_DEBUG_RUNTIMEINTERFACE 00129 #define FD_DRTI(message) FAUDES_WRITE_CONSOLE("FAUDES_RTI: " << message) 00130 #else 00131 #define FD_DRTI(message) 00132 #endif 00133 00134 /** Debug: optional report registry operations */ 00135 #ifdef FAUDES_DEBUG_REGISTRY 00136 #define FD_DREG(message) FAUDES_WRITE_CONSOLE("FAUDES_REG: " << message) 00137 #else 00138 #define FD_DREG(message) 00139 #endif 00140 00141 /** Debug: optional low-level report on iterations and token IO */ 00142 #ifdef FAUDES_DEBUG_VERBOSE 00143 #define FD_DV(message) FAUDES_WRITE_CONSOLE("FAUDES_VERBOSE: " << message) 00144 #else 00145 #define FD_DV(message) 00146 #endif 00147 00148 /** Debug: count objects, report on exit */ 00149 #ifdef FAUDES_DEBUG_CODE 00150 #define FAUDES_OBJCOUNT_INC(type) ObjectCount::Inc(type) 00151 #define FAUDES_OBJCOUNT_DEC(type) ObjectCount::Dec(type) 00152 #else 00153 #define FAUDES_OBJCOUNT_INC(type) 00154 #define FAUDES_OBJCOUNT_DEC(type) 00155 #endif 00156 00157 /** Tutorial/debugging mark */ 00158 #define FD_DLINE(message) FD_WARN( \ 00159 std::endl << "################################################ " << \ 00160 std::endl << message << " at file " << __FILE__ << ", line " << __LINE__ << endl << \ 00161 std::endl << "################################################ " << std::endl ); 00162 00163 00164 /** Doxygen: exclude this from doxygen */ 00165 #ifndef FAUDES_DOXYGEN 00166 #define FAUDES_NODOC(a) a 00167 #else 00168 #define FAUDES_NODOC(a) 00169 #endif 00170 00171 /* Doxygen: include group definitions */ 00172 #ifdef FAUDES_DOXYGEN 00173 #include "doxygen_groups.h" 00174 #endif 00175 00176 } // namespace faudes 00177 00178 #endif 00179 |
libFAUDES 2.22k --- 2013.04.02 --- c++ source docu by doxygen