![]() |
![]() |
|
Index
Source Files
Annotated Class List
Alphabetical Class List
Class Hierarchy
Graphical Class Hierarchy
|
||
![]() |
![]() |
#include <CallStack.h>
Collaboration diagram for FIX::CallStack:

Public Member Functions | |
| CallStack (const std::string &name, const std::string &file, int line) | |
| ~CallStack () | |
Static Public Member Functions | |
| void | output () |
| void | ignore (bool) |
| void | caught (std::exception &e) |
| void | caught () |
| void | terminate () |
Static Private Member Functions | |
| Context & | getContext () |
| Context & | getErrorContext () |
Static Private Attributes | |
| std::map< unsigned, Context > | s_stack |
| std::map< unsigned, Context > | s_error |
| Mutex | s_mutex |
Definition at line 39 of file CallStack.h.
|
||||||||||||||||
|
Definition at line 37 of file CallStack.cpp. References getContext(), getErrorContext(), FIX::CallStack::Context::ignore, s_mutex, and terminate().
00038 {
00039 Locker locker(s_mutex);
00040
00041 #if TERMINATE_IN_STD
00042 std::set_terminate(FIX::CallStack::terminate);
00043 #else
00044 set_terminate(FIX::CallStack::terminate);
00045 #endif
00046
00047 Context& c = getContext();
00048 if( !c.ignore )
00049 {
00050 c.push(Method(name, file, line));
00051 getErrorContext() = c;
00052 }
00053 }
|
|
|
Definition at line 55 of file CallStack.cpp. References getContext(), FIX::CallStack::Context::ignore, and s_mutex.
00056 {
00057 Locker locker(s_mutex);
00058 Context& c = getContext();
00059 if( !c.ignore )
00060 c.pop();
00061 }
|
|
|
Definition at line 94 of file CallStack.cpp. References FIX::CallStack::Context::caught(), getErrorContext(), FIX::CallStack::Context::ignore, and s_mutex.
00095 {
00096 Locker locker(s_mutex);
00097 Context& c = getErrorContext();
00098 if( c.ignore ) return;
00099 c.caught();
00100 }
|
|
|
Definition at line 86 of file CallStack.cpp. References FIX::CallStack::Context::caught(), getErrorContext(), FIX::CallStack::Context::ignore, and s_mutex.
00087 {
00088 Locker locker(s_mutex);
00089 Context& c = getErrorContext();
00090 if( c.ignore ) return;
00091 c.caught(e);
00092 }
|
|
|
Definition at line 102 of file CallStack.cpp. References s_mutex, s_stack, and FIX::thread_self(). Referenced by CallStack(), ignore(), and ~CallStack().
00103 {
00104 Locker locker(s_mutex);
00105 return s_stack[thread_self()];
00106 }
|
|
|
Definition at line 108 of file CallStack.cpp. References s_error, s_mutex, and FIX::thread_self(). Referenced by CallStack(), and caught().
00109 {
00110 Locker locker(s_mutex);
00111 return s_error[thread_self()];
00112 }
|
|
|
Definition at line 80 of file CallStack.cpp. References getContext(), FIX::CallStack::Context::ignore, and s_mutex.
00081 {
00082 Locker locker(s_mutex);
00083 getContext().ignore = value;
00084 }
|
|
|
Definition at line 63 of file CallStack.cpp. References FIX::CallStack::Context::exception, s_error, and s_mutex.
00064 {
00065 Locker locker(s_mutex);
00066 std::map<unsigned, CallStack::Context>::iterator i;
00067 for( i = s_error.begin(); i != s_error.end(); ++i )
00068 {
00069 Context& c = i->second;
00070 if(c.size())
00071 std::cerr << "thread(" << i->first << "):" << c.exception << std::endl;
00072 while(c.size())
00073 {
00074 std::cerr << " at " << c.top() << std::endl;
00075 c.pop();
00076 }
00077 }
00078 }
|
|
|
Definition at line 114 of file CallStack.cpp. References s_mutex. Referenced by CallStack().
00115 {
00116 Locker locker(s_mutex);
00117 CallStack::output();
00118 abort();
00119 }
|
|
|
Definition at line 33 of file CallStack.cpp. Referenced by getErrorContext(), and output(). |
|
|
Definition at line 34 of file CallStack.cpp. Referenced by CallStack(), caught(), getContext(), getErrorContext(), ignore(), output(), terminate(), and ~CallStack(). |
|
|
Definition at line 32 of file CallStack.cpp. Referenced by getContext(). |
1.3.6-20040222 written by Dimitri van Heesch,
© 1997-2001