## Signals 總結
以下情形時使用 Signals :
* 你需要健壯的回調時
* 事件具有多個處理者時
* `signal` 與插槽之間的連接需要在運行時可配置時
Boost.Signals 取代舊有風格的回調現在已經是很清楚了,這個庫是當前可用的、最好的 signals/slots 實現之一。這個庫所代表的設計模式非常著名,并且已經被研究了很長一段時間,所以這個領域已經非常成熟。一些編程語言已經在語言中直接實現了這種機制,如 .NET 中的delegates 和 events。在C++中,這個問題被庫優美地解決了。Signals 和 slots 用于把事件的觸發器機制從處理它的代碼中分離出去。這種分離解耦了子系統,使它們更易于理解。它還解決了當重要事件發生時更新多個關注方的問題。在典型的程序或庫中,有很多地方需要用到 signals 和 slots?。無論你是在編寫一個GUI框架,或是一個發電站的入侵檢測系統,Signals 都可以滿足你的需要。它的用法很容易學習,它還提供了復雜任務所需的高級功能。例如,定制的 Combiners 可用于編寫特定領域的事件處理機制。
Boost.Signals 由 Douglas Gregor 編寫(他還編寫了 Boost.Function)。這是一個偉大的庫;謝謝你,Doug!
- 序
- 前言
- Acknowledgments
- 關于作者
- 本書的組織結構
- Boost的介紹
- 字符串及文本處理
- 數 據結構, 容器, 迭代器, 和算法
- 函數對象及高級編程
- 泛 型編程與模板元編程
- 數學及數字處理
- 輸入/輸出
- 雜項
- Part I: 通用庫
- Library 1. Smart_ptr
- Smart_ptr庫如何改進你的程序?
- 何時我們需要智能指針?
- Smart_ptr如何適應標準庫?
- scoped_ptr
- scoped_array
- shared_ptr
- shared_array
- intrusive_ptr
- weak_ptr
- Smart_ptr總結
- Library 2. Conversion
- Conversion 庫如何改進你的程序?
- polymorphic_cast
- polymorphic_downcast
- numeric_cast
- lexical_cast
- Conversion 總結
- Library 3. Utility
- Utility 庫如何改進你的程序?
- BOOST_STATIC_ASSERT
- checked_delete
- noncopyable
- addressof
- enable_if
- Utility 總結
- Library 4. Operators
- Operators庫如何改進你的程序?
- Operators
- 用法
- Operators 總結
- Library 5. Regex
- Regex庫如何改進你的程序?
- Regex 如何適用于標準庫?
- Regex
- 用法
- Regex 總結
- Part II: 容器及數據結構
- Library 6. Any
- Any 庫如何改進你的程序?
- Any 如何適用于標準庫?
- Any
- 用法
- Any 總結
- Library 7. Variant
- Variant 庫如何改進你的程序?
- Variant 如何適用于標準庫?
- Variant
- 用法
- Variant 總結
- Library 8. Tuple
- Tuple 庫如何改進你的程序?
- Tuple 庫如何適用于標準庫?
- Tuple
- 用法
- Tuple 總結
- Part III: 函數對象與高級編程
- Library 9. Bind
- Bind 庫如何改進你的程序?
- Bind 如何適用于標準庫?
- Bind
- 用法
- Bind 總結
- Library 10. Lambda
- Lambda 庫如何改進你的程序?
- Lambda 如何適用于標準庫?
- Lambda
- 用法
- Lambda 總結
- Library 11. Function
- Function 庫如何改進你的程序?
- Function 如何適用于標準庫?
- Function
- 用 法
- Function 總結
- Library 12. Signals
- Signals 庫如何改進你的程序?
- Signals 如何適用于標準庫?
- Signals
- 用法
- Signals 總結