55 namespace RBD_COMMON {
73 void ReName(
const char*);
74 static void PrintTrace();
75 static void AddTrace();
88 static void AddMessage(
const char* a_what);
90 static void AddInt(
int value);
93 static const char*
what() {
return what_error; }
97 #ifdef TypeDefException 102 : entry(e), previous(last) {
last =
this; }
108 #ifdef SimulateExceptions // SimulateExceptions 133 JumpItem() : ji(JumpBase::jl),
trace(0), janitor(0)
134 { JumpBase::jl =
this; }
135 ~JumpItem() { JumpBase::jl = ji; }
143 if (!setjmp( JumpBase::jl->env )) { \ 144 JumpBase::jl->trace = Tracer::last; \ 145 JumpItem JI387256156; 147 #define ReThrow Throw() 149 #define Catch(EXCEPTION) \ 150 } else if (BaseException::Select == EXCEPTION::Select) { 152 #define CatchAll } else 154 #define CatchAndThrow } else Throw(); 162 static bool do_not_link;
166 virtual void CleanUp() {}
176 class JanitorInitializer
179 JanitorInitializer();
181 static int ref_count;
184 static JanitorInitializer JanInit;
186 #endif // end of SimulateExceptions 191 #define Throw(E) throw E 192 #define ReThrow throw 194 #define CatchAll catch(...) 195 #define CatchAndThrow {} 197 #endif // end of UseExceptions 200 #ifdef DisableExceptions // Disable exceptions 203 #define ReThrow Throw() 204 #define Catch(EXCEPTION) } if (false) { 205 #define CatchAll } if (false) 206 #define CatchAndThrow } 212 #endif // end of DisableExceptions 214 #ifndef SimulateExceptions // ! SimulateExceptions 224 #endif // end of ! SimulateExceptions 229 #ifdef DO_FREE_CHECK // DO_FREE_CHECK 240 virtual void Report()=0;
241 friend class FreeCheck;
244 class FCLClass :
public FreeCheckLink
247 FCLClass(
void* t,
char* name);
249 friend class FreeCheck;
252 class FCLRealArray :
public FreeCheckLink
256 FCLRealArray(
void* t,
char* o,
int s);
258 friend class FreeCheck;
261 class FCLIntArray :
public FreeCheckLink
265 FCLIntArray(
void* t,
char* o,
int s);
267 friend class FreeCheck;
273 static FreeCheckLink* next;
274 static int BadDelete;
276 static void Register(
void*,
char*);
277 static void DeRegister(
void*,
char*);
278 static void RegisterR(
void*,
char*,
int);
279 static void DeRegisterR(
void*,
char*,
int);
280 static void RegisterI(
void*,
char*,
int);
281 static void DeRegisterI(
void*,
char*,
int);
282 static void Status();
283 friend class FreeCheckLink;
284 friend class FCLClass;
285 friend class FCLRealArray;
286 friend class FCLIntArray;
289 #define FREE_CHECK(Class) \ 291 void* operator new(size_t size) \ 293 void* t = ::operator new(size); FreeCheck::Register(t,#Class); \ 296 void operator delete(void* t) \ 297 { FreeCheck::DeRegister(t,#Class); ::operator delete(t); } 300 #ifdef SimulateExceptions // SimulateExceptions 302 #define NEW_DELETE(Class) \ 304 void* operator new(size_t size) \ 307 void* t = ::operator new(size); FreeCheck::Register(t,#Class); \ 310 void operator delete(void* t) \ 311 { FreeCheck::DeRegister(t,#Class); ::operator delete(t); } 314 #endif // end of SimulateExceptions 317 #define MONITOR_REAL_NEW(Operation, Size, Pointer) \ 318 FreeCheck::RegisterR(Pointer, Operation, Size); 319 #define MONITOR_INT_NEW(Operation, Size, Pointer) \ 320 FreeCheck::RegisterI(Pointer, Operation, Size); 321 #define MONITOR_REAL_DELETE(Operation, Size, Pointer) \ 322 FreeCheck::DeRegisterR(Pointer, Operation, Size); 323 #define MONITOR_INT_DELETE(Operation, Size, Pointer) \ 324 FreeCheck::DeRegisterI(Pointer, Operation, Size); 326 #else // DO_FREE_CHECK not defined 328 #define FREE_CHECK(Class) public: 329 #define MONITOR_REAL_NEW(Operation, Size, Pointer) {} 330 #define MONITOR_INT_NEW(Operation, Size, Pointer) {} 331 #define MONITOR_REAL_DELETE(Operation, Size, Pointer) {} 332 #define MONITOR_INT_DELETE(Operation, Size, Pointer) {} 335 #ifdef SimulateExceptions // SimulateExceptions 338 #define NEW_DELETE(Class) \ 340 void* operator new(size_t size) \ 341 { do_not_link=true; void* t = ::operator new(size); return t; } \ 342 void operator delete(void* t) { ::operator delete(t); } 344 #endif // end of SimulateExceptions 346 #endif // end of ! DO_FREE_CHECK 348 #ifndef SimulateExceptions // ! SimulateExceptions 350 #define NEW_DELETE(Class) FREE_CHECK(Class) 352 #endif // end of ! SimulateExceptions 439 #endif // end of EXCEPTION_LIB
static unsigned long Select
static unsigned long Select
static unsigned long Select
static unsigned long Select
static unsigned long Select
static unsigned long Select
static unsigned long Select
static unsigned long Select
static const char * what()
Real trace(const BaseMatrix &B)
static unsigned long Select
void ReName(const char *)
static unsigned long Select