Changeset 9390 in orxonox.OLD for branches/proxy/src/lib/util/sigslot
- Timestamp:
- Jul 22, 2006, 11:17:00 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/util/sigslot/signal.h
r9369 r9390 13 13 // QUICK DOCUMENTATION 14 14 // 15 // 15 // (see also the full documentation at http://sigslot.sourceforge.net/) 16 16 // 17 // 18 // SIGSLOT_PURE_ISO- Define this to force ISO C++ compliance. This also disables19 // 20 // 17 // #define switches 18 // SIGSLOT_PURE_ISO - Define this to force ISO C++ compliance. This also disables 19 // all of the thread safety support on platforms where it is 20 // available. 21 21 // 22 // SIGSLOT_USE_POSIX_THREADS- Force use of Posix threads when using a C++ compiler other than23 // 24 // 25 // 22 // SIGSLOT_USE_POSIX_THREADS - Force use of Posix threads when using a C++ compiler other than 23 // gcc on a platform that supports Posix threads. (When using gcc, 24 // this is the default - use SIGSLOT_PURE_ISO to disable this if 25 // necessary) 26 26 // 27 // SIGSLOT_DEFAULT_MT_POLICY- Where thread support is enabled, this defaults to multi_threaded_global.28 // 29 // 30 // 27 // SIGSLOT_DEFAULT_MT_POLICY - Where thread support is enabled, this defaults to multi_threaded_global. 28 // Otherwise, the default is single_threaded. #define this yourself to 29 // override the default. In pure ISO mode, anything other than 30 // single_threaded will cause a compiler error. 31 31 // 32 // 32 // PLATFORM NOTES 33 33 // 34 // Win32- On Win32, the WIN32 symbol must be #defined. Most mainstream35 // 36 // 37 // 34 // Win32 - On Win32, the WIN32 symbol must be #defined. Most mainstream 35 // compilers do this by default, but you may need to define it 36 // yourself if your build environment is less standard. This causes 37 // the Win32 thread support to be compiled in and used automatically. 38 38 // 39 // Unix/Linux/BSD, etc.- If you're using gcc, it is assumed that you have Posix threads40 // 41 // 42 // 43 // 39 // Unix/Linux/BSD, etc. - If you're using gcc, it is assumed that you have Posix threads 40 // available, so they are used automatically. You can override this 41 // (as under Windows) with the SIGSLOT_PURE_ISO switch. If you're using 42 // something other than gcc but still want to use Posix threads, you 43 // need to #define SIGSLOT_USE_POSIX_THREADS. 44 44 // 45 // ISO C++- If none of the supported platforms are detected, or if46 // 47 // 48 // 49 // 50 // 51 // 45 // ISO C++ - If none of the supported platforms are detected, or if 46 // SIGSLOT_PURE_ISO is defined, all multithreading support is turned off, 47 // along with any code that might cause a pure ISO C++ environment to 48 // complain. Before you ask, gcc -ansi -pedantic won't compile this 49 // library, but gcc -ansi is fine. Pedantic mode seems to throw a lot of 50 // errors that aren't really there. If you feel like investigating this, 51 // please contact the author. 52 52 // 53 53 // 54 // 54 // THREADING MODES 55 55 // 56 // single_threaded- Your program is assumed to be single threaded from the point of view57 // 58 // 59 // 60 // 56 // single_threaded - Your program is assumed to be single threaded from the point of view 57 // of signal/slot usage (i.e. all objects using signals and slots are 58 // created and destroyed from a single thread). Behaviour if objects are 59 // destroyed concurrently is undefined (i.e. you'll get the occasional 60 // segmentation fault/memory exception). 61 61 // 62 // multi_threaded_global- Your program is assumed to be multi threaded. Objects using signals and63 // 64 // 65 // 66 // 67 // 68 // 62 // multi_threaded_global - Your program is assumed to be multi threaded. Objects using signals and 63 // slots can be safely created and destroyed from any thread, even when 64 // connections exist. In multi_threaded_global mode, this is achieved by a 65 // single global mutex (actually a critical section on Windows because they 66 // are faster). This option uses less OS resources, but results in more 67 // opportunities for contention, possibly resulting in more context switches 68 // than are strictly necessary. 69 69 // 70 // multi_threaded_local- Behaviour in this mode is essentially the same as multi_threaded_global,71 // 72 // 73 // 74 // 75 // 70 // multi_threaded_local - Behaviour in this mode is essentially the same as multi_threaded_global, 71 // except that each signal, and each object that inherits has_slots, all 72 // have their own mutex/critical section. In practice, this means that 73 // mutex collisions (and hence context switches) only happen if they are 74 // absolutely essential. However, on some platforms, creating a lot of 75 // mutexes can slow down the whole OS, so use this option with care. 76 76 // 77 // 77 // USING THE LIBRARY 78 78 // 79 // 79 // See the full documentation at http://sigslot.sourceforge.net/ 80 80 // 81 81 // … … 281 281 { 282 282 m_connected_slots.erase(it); 283 // 283 // delete *it; 284 284 } 285 285 … … 409 409 { 410 410 m_connected_slots.erase(it); 411 // 411 // delete *it; 412 412 } 413 413 … … 522 522 { 523 523 m_connected_slots.erase(it); 524 // 524 // delete *it; 525 525 } 526 526 … … 634 634 { 635 635 m_connected_slots.erase(it); 636 // 636 // delete *it; 637 637 } 638 638 … … 746 746 { 747 747 m_connected_slots.erase(it); 748 // 748 // delete *it; 749 749 } 750 750 … … 860 860 { 861 861 m_connected_slots.erase(it); 862 // 862 // delete *it; 863 863 } 864 864 … … 974 974 { 975 975 m_connected_slots.erase(it); 976 // 976 // delete *it; 977 977 } 978 978 … … 1088 1088 { 1089 1089 m_connected_slots.erase(it); 1090 // 1090 // delete *it; 1091 1091 } 1092 1092 … … 1203 1203 { 1204 1204 m_connected_slots.erase(it); 1205 // 1205 // delete *it; 1206 1206 } 1207 1207
Note: See TracChangeset
for help on using the changeset viewer.