|
Go to the documentation of this file.
32 #ifndef FAUDES_DEFINITIONS_H
33 #define FAUDES_DEFINITIONS_H
38 #include "configuration.h"
44 #define FAUDES_IDX_MAX 0xFFFFFFFFU
48 #define FAUDES_INT_MIN (std::numeric_limits<int>::min())
49 #define FAUDES_INT_MAX (std::numeric_limits<Type>::max())
58 #define FD_MAXCONTAINERNAME 70
61 #define FD_SMALLTRANSREL 100
64 #define FD_CONSECUTIVE 6
67 #define FD_RTIMAXSIG 5
69 #ifndef FAUDES_VERSION
71 #define FAUDES_VERSION "undefined version"
75 #define FAUDES_WRITE_DIRECT(message) \
76 { if(!faudes::ConsoleOut::G()->Mute()) { std::cout << message << std::endl;} }
79 #define FAUDES_WRITE_CONSOLE(message) \
80 { if(!faudes::ConsoleOut::G()->Mute()) { \
81 std::ostringstream cfl_line; cfl_line << message << std::endl; faudes::ConsoleOut::G()->Write(cfl_line.str());} }
84 #define FD_WARN(message) FAUDES_WRITE_CONSOLE("FAUDES_WARNING: " << message)
87 #ifdef FAUDES_DEBUG_CODE
88 #define FD_ERR(message) \
89 FAUDES_WRITE_CONSOLE("FAUDES_CODE: " << message << " in " << __FILE__ << ":" << __LINE__ )
91 #define FD_ERR(message)
95 #ifdef FAUDES_WRITE_PROGRESS
96 #define FD_WP(message) {FAUDES_WRITE_CONSOLE("FAUDES_PROGRESS: " << message); LoopCallback();}
98 #define FD_WP(message)
102 #ifdef FAUDES_WRITE_PROGRESS
103 #define FD_WPC(cntnow, cntdone, message) \
104 { std::ostringstream cfl_line; cfl_line << "FAUDES_PROGRESS: " << message << std::endl; \
105 faudes::ConsoleOut::G()->Write(cfl_line.str(),(cntnow),(cntdone)); LoopCallback(); }
107 #define FD_WPC(cntnow, contdone, message)
111 #define FD_WPD(cntnow, cntdone, message) { \
112 static faudes_systime_t start; \
113 static faudes_systime_t now; \
114 static faudes_mstime_t lap; \
116 static bool init(false); \
117 if(!init) { faudes_gettimeofday(&start); prog=cntnow;} \
118 faudes_gettimeofday(&now); \
119 faudes_diffsystime(now,start,&lap); \
120 if(!init) lap=10000; \
122 Int cps = (cntnow-prog)/(lap/1000); \
123 std::ostringstream cfl_line; \
124 cfl_line << "FAUDES_PROGRESS: " << message; \
125 if(cntnow>0) cfl_line << " (#/sec: " << cps << ")";\
126 cfl_line << std::endl; \
127 faudes::ConsoleOut::G()->Write(cfl_line.str(),(cntnow),(cntdone)); LoopCallback(); \
128 faudes_gettimeofday(&start); \
135 #ifdef FAUDES_DEBUG_FUNCTION
136 #define FD_DF(message) FAUDES_WRITE_CONSOLE("FAUDES_FUNCTION: " << message)
138 #define FD_DF(message)
143 #ifdef FAUDES_DEBUG_GENERATOR
144 #define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message)
146 #define FD_DG(message)
150 #ifdef FAUDES_DEBUG_CONTAINER
151 #define FD_DC(message) FAUDES_WRITE_CONSOLE("FAUDES_CONTAINER: " << message)
153 #define FD_DC(message)
157 #ifdef FAUDES_DEBUG_RUNTIMEINTERFACE
158 #define FD_DRTI(message) FAUDES_WRITE_CONSOLE("FAUDES_RTI: " << message)
160 #define FD_DRTI(message)
164 #ifdef FAUDES_DEBUG_REGISTRY
165 #define FD_DREG(message) FAUDES_WRITE_CONSOLE("FAUDES_REG: " << message)
167 #define FD_DREG(message)
171 #ifdef FAUDES_DEBUG_VERBOSE
172 #define FD_DV(message) FAUDES_WRITE_CONSOLE("FAUDES_VERBOSE: " << message)
174 #define FD_DV(message)
178 #ifdef FAUDES_DEBUG_CODE
179 #define FAUDES_OBJCOUNT_INC(type) ObjectCount::Inc(type)
180 #define FAUDES_OBJCOUNT_DEC(type) ObjectCount::Dec(type)
182 #define FAUDES_OBJCOUNT_INC(type)
183 #define FAUDES_OBJCOUNT_DEC(type)
187 #define FAUDES_TIMER_START(msg) { \
188 FD_WARN("timer start " << msg ); \
189 faudes_gettimeofday(& gPerfTimer1 ); }
190 #define FAUDES_TIMER_LAP(msg) { \
191 faudes_systime_t now; \
192 faudes_mstime_t lap; \
193 faudes_gettimeofday(&now); \
194 faudes_diffsystime(now,gPerfTimer1,&lap); \
195 FD_WARN("timer lap " << msg << " " << lap << "ms");}
199 #define FD_DLINE(message) FD_WARN( \
200 std::endl << "################################################ " << \
201 std::endl << message << " at file " << __FILE__ << ", line " << __LINE__ << endl << \
202 std::endl << "################################################ " << std::endl );
206 #ifndef FAUDES_DOXYGEN
207 #define FAUDES_NODOC(a) a
209 #define FAUDES_NODOC(a)
213 #ifdef FAUDES_DOXYGEN
libFAUDES resides within the namespace faudes.
uint32_t Idx Type definition for index type (allways 32bit)
double Float Type definition for real type.
long int Int Type definition for integer type (let target system decide, minimum 32bit)
libFAUDES 2.32b
--- 2024.03.01
--- c++ api documentaion by doxygen
|