Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9390 in orxonox.OLD for branches/proxy/src/lib/util


Ignore:
Timestamp:
Jul 22, 2006, 11:17:00 AM (18 years ago)
Author:
bensch
Message:

nicer docu in sigslot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/util/sigslot/signal.h

    r9369 r9390  
    1313// QUICK DOCUMENTATION
    1414//
    15 //                              (see also the full documentation at http://sigslot.sourceforge.net/)
     15//        (see also the full documentation at http://sigslot.sourceforge.net/)
    1616//
    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.
     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.
    2121//
    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)
     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)
    2626//
    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.
     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.
    3131//
    32 //              PLATFORM NOTES
     32// PLATFORM NOTES
    3333//
    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.
     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.
    3838//
    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.
     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.
    4444//
    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.
     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.
    5252//
    5353//
    54 //              THREADING MODES
     54// THREADING MODES
    5555//
    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).
     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).
    6161//
    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.
     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.
    6969//
    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.
     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.
    7676//
    77 //              USING THE LIBRARY
     77// USING THE LIBRARY
    7878//
    79 //                      See the full documentation at http://sigslot.sourceforge.net/
     79//        See the full documentation at http://sigslot.sourceforge.net/
    8080//
    8181//
     
    281281        {
    282282          m_connected_slots.erase(it);
    283           //                    delete *it;
     283          //                        delete *it;
    284284        }
    285285
     
    409409        {
    410410          m_connected_slots.erase(it);
    411           //                    delete *it;
     411          //                        delete *it;
    412412        }
    413413
     
    522522        {
    523523          m_connected_slots.erase(it);
    524           //                    delete *it;
     524          //                        delete *it;
    525525        }
    526526
     
    634634        {
    635635          m_connected_slots.erase(it);
    636           //                    delete *it;
     636          //                        delete *it;
    637637        }
    638638
     
    746746        {
    747747          m_connected_slots.erase(it);
    748           //                    delete *it;
     748          //                        delete *it;
    749749        }
    750750
     
    860860        {
    861861          m_connected_slots.erase(it);
    862           //                    delete *it;
     862          //                        delete *it;
    863863        }
    864864
     
    974974        {
    975975          m_connected_slots.erase(it);
    976           //                    delete *it;
     976          //                        delete *it;
    977977        }
    978978
     
    10881088        {
    10891089          m_connected_slots.erase(it);
    1090           //                    delete *it;
     1090          //                        delete *it;
    10911091        }
    10921092
     
    12031203        {
    12041204          m_connected_slots.erase(it);
    1205           //                    delete *it;
     1205          //                        delete *it;
    12061206        }
    12071207
Note: See TracChangeset for help on using the changeset viewer.