Standard C++ IOStreams and Locales: Advanced Programmer's Guide and Reference (Hardcover)
暫譯: 標準 C++ IOStreams 與區域設定:進階程式設計師指南與參考 (精裝版)
Angelika Langer, Klaus Kreft
- 出版商: Addison Wesley
- 出版日期: 2000-02-10
- 售價: $2,390
- 貴賓價: 9.5 折 $2,271
- 語言: 英文
- 頁數: 672
- 裝訂: Hardcover
- ISBN: 0201183951
- ISBN-13: 9780201183955
-
相關分類:
C++ 程式語言、Apple Developer
無法訂購
買這商品的人也買了...
-
$680$537 -
$980$774 -
$880$695 -
$780$741 -
$590$466 -
$680$537 -
$690$538 -
$420$332 -
$720$562 -
$780$616 -
$650$514 -
$780$616 -
$720$569 -
$880$792 -
$560$442 -
$750$638 -
$720$569 -
$560$476 -
$390$304 -
$490$387 -
$480$379 -
$750$593 -
$375Macromedia Dreamweaver 8 for Windows and Macintosh: Visual QuickStart Guide (Paperback)
-
$650$507 -
$720$569
商品描述
Description
The first in-depth guide to Standard C++ IOStreams and internationalization -- by two world-renowned C++ experts.
- Includes extensive examples and case studies -- from simple to complex.
- Patterns of usage, practical tips and tricks, and internationalization techniques.
- Contains complete class references for IOStreams and locale components.
Angelika Langer works as a freelance writer and courseware developer. Formerly a senior trainer/developer at Rogue Wave Software, Inc., she led development of a C++ compiler standard library at Siemens Nixdorf, and has served on the ISO/ANSI Standards Committee since 1993.
Klaus Kreft is a software architect and senior consultant at Siemens Nixdorf Information Systems in Germany. He was previously a senior trainer/consultant at Rogue Wave Software, Inc., in Oregon. Together, the authors developed a course on the STL for Rogue Wave Software, and write a column on the Standard C++ Library for C++ Report.
Table Of Contents
Preface.Foreword.
Guide to Readers.
PART I. STREAM INPUT AND OUTPUT.
1. IOStreams Basics.Formatted Input/Output.
The Input and Output Operators.
The Format Parameters of a Stream.
Manipulators.
The Locale of a Stream.
Comparison Between Formatted Input and Output.
Peculiarities of Formatted Input.
The Stream State.
Checking the Stream State.
Catching Stream Exceptions.
Resetting the Stream State.
File Input/Output.
The Open Modes.
Bidirectional File Streams.
In-Memory Input/Output.
Unformatted Input/Output.
Stream Positioning.
Synchronization of Streams.
Synchronization using the unitbuf Format Flag.
Synchronization by Tying Streams.
Synchronizing the Predefined Standard Streams.
Synchronization with the C Standard I/O.
Synchronization with the External Device.
Synchronization Between Predefined Standard for Narrow and Wide Characters.
2. The Architecture of IOStreams.
The General Stream Classes.
The Concrete Stream Classes.
How Streams Maintain their Stream Buffer.
Copying and Assignment of Streams.
How Streams Maintain Their Locale.
Collaboration Among Streams, Stream Buffers, and Locales.
The Stream Buffer Classes.
The Stream Buffer Abstraction.
String Stream Buffers.
File Stream Buffers.
Character Types and Character Traits.
Character Traits.
Copying, Finding, and Comparing Characters.
Conversion State.
Stream Positions.
The Predefined Standard Character Traits.
Character Types.
Stream Iterators and Stream Buffer Iterators.
Stream Iterators.
Input Stream Iterator.
Stream Iterators are One-Pass Iterators.
Stream Buffer Iterators.
Input Stream Buffer Iterator.
Additional Stream Storage and Stream Callbacks.
Stream Callbacks.
3. Advanced IOStreams Usage.
First Inserters and Extractors.
Refinements.
Prefix and Suffix Operations.
Error Indication.
Internationalization.
I/O Operations.
Refined Inserters and Extractors.
Prefix and Suffix Operations.
Format Control.
Error Indication.
Using the Refined Inserter and Extractor.
Generic Inserters and Extractors.
Simple Versus Refined Approach.
User-Defined Manipulators.
Manipulators with Parameters.
Generalized Technique: Using a Manipulator Base Template.
Variants of a Manipulator Implementation.
Refinements.
Manipulators with State.
The Standard Manipulator Base Type smanip.
Extending Stream Functionality.
Implementing the Date Inserter.
Implementing the Maniuplator.
Using Stream Callbacks for Memory Management.
Error Indication of Stream Callback Functions.
Using the New Functionality.
Evaluation of the iword/pword Approach.
Creating New Stream Classes by Derivation.
Implementing the Date Inserter and the Manipulator.
Implementing the Manipulator.
Using the New Functionality.
Summary.
Comparing Both Solutions—iword/pword Versus Derivation.
Adding Stream Buffer Functionality.
Stream Buffer for Buffered Character Transport.
Optional Functionality of Stream Buffers.
Providing New Stream Classes Along with New Stream Buffer Classes.
Deriving from Concrete Stream Buffer Classes.
II. INTERNATIONALIZATION.
4. Introduction to Internationalization and Localization.
Cultural Conventions.
Numerical Values.
Monetary Values.
Time and Date.
Sorting Words.
Messages.
Character Encodings.
Character Codesets.
Character Encoding Schemes.
Uses of Multibyte Encodings and Wide Characters.
Code Conversions.
5. Locales.
Combined Locales.
The Global Locale.
Retrieving Facets from a Locale.
use_facet.
6. Standard Facets.
Character Classification.
Character Conversion Between charT and char.
Special Properties of ctype
String Collation.
Code Conversion.
Message Catalogs.
Formatting and Parsing Facets.
The num_put Facet.
The num_get Facet.
Monetary Values.
The money_put Facet.
The money_get Facet.
Date and Time Values.
The time_get Facet.
Grouping of Standard Facets in a Locale.
The Derived by name Facets.
Behavior of the Base Class Facets.
Mandatory Facet Types.
Locale Categories.
Diagram: Facets and Categories.
Advanced Usage of the Standard Facets.
Use of a Facet Through a Locale.
Direct Use of the Facet Independent of a Locale.
7. The Archtecture of the Locale Framework.
Identification and Lookup of Facets in a Locale.
Facet Lookup.
Storing Facets in a Locale.
The Rationale Behind the Use of the Two-Phase Polymorphism.
Memory Management of Facets in Locale.
Immutability of Facets in a Locale.
8. User-Defined Facets.
Defining a New Facet Family.
Reference Guide.
Introduction.
1. Locale.
global functions.
codecvt.
codecvt_base.
codecvt_byname.
collate.
collate_byname.
ctype.
ctype.
cytpe_base.
ctype_byname.
locale.
messages.
messages_base.
messages_byname.
money_base.
money_get.
moneypunct.
moneypunct_byname.
money_put.
num_get.
numpunct.
numpunct_byname.
num_put.
time_base.
time_get.
time_get_byname.
time_put.
time_put_byname.
time_base.
tm.
2. Character Traits.
char_traits
char_traits
char_traits
3. IOStreams.
global type definitions.
global objects.
basic_filebuf
basic_fstream
basic_ifstream
basic_ios
basic_iostream
basic_istream
basic_istringstream
basic_ofstream
basic_ostream
basic_ostringstream
basic_streambuf
basic_stringbuf
basic_stringstream
fpos
ios_base.
manipulators.
4. Stream Iterators.
istreambuf_iterator
istream_iterator
iterator
iterator category tags.
ostreambuf_iterator
ostream_iterator
5. Other I/O Operations.
complex
basic_string
Appendix A: Parsing and Extraction of Numerical and bool Values.
A.2 Parsing bool Values.
A.3 Conversion Specifier and Length Modifier.
Appendix B: Formatting of Numerical and bool Values.
B.2 Formatting bool Values.
B.3 Conversion Specifiers, Qualifiers, and Length Modifiers.
Appendix C: strftime() Conversion Specifiers.
Appendix D: Correspondences Between C and C++IOStreams.
D.2 Stream Positions.
Appendix E: Differences Between Classic and Standard IOStreams.
E.2 Splitting Base Class ios.
E.3 Indicating Errors.
E.4 Internationalizing IOStreams.
E.5 Removing_withassign Classes.
E.6 Removing File Descriptors.
E.7 String Streams: Replacing strstream by stringstream.
E.8 Changes to the Stream Buffer Classes.
E.9 Minor changes.
Appendix F: Relationship Between C and C++ Locales.
F.2 The Global Locale in C and C++.
Appendix G: New C++ Features and Idoms.
G.2 POD--Plain Old Data.
G.3 Explicit Constructors.
G.4 Template Specialization.
G.5 Default Template Arguments.
G.6 Explicit Template Argument Specification.
G.7 The Typename Keyword.
G.8 Dynamic Cast.
G.9 Function try Blocks.
G.10 Standard Exceptions.
G.11 Numeric Limits.
G.12 C++ Strings.
Bibliography.
Index. 0201183951T04062001

商品描述(中文翻譯)
描述
這是第一本深入探討標準 C++ IOStreams 和國際化的指南,由兩位世界知名的 C++ 專家撰寫。
- 包含大量的範例和案例研究,從簡單到複雜。
- 使用模式、實用技巧和國際化技術。
- 包含 IOStreams 和地區組件的完整類別參考。
IOStreams 和 Locales 是 ISO/ANSI C++ 標準中最重要、最受期待的兩個組件,而這是第一本專門深入探討它們的書籍。作者解釋了 IOStreams 和 Locales 解決的問題,然後展示了從簡單到複雜的各種範例和技術。作者介紹了概念、組件架構、符合標準的代碼和實用的使用模式。內容涵蓋:標準 IOStreams 和之前的非標準版本之間的主要差異;如何擴展 Locales 組件以實現更有效的國際化;等等。這本書還包括完整的權威類別參考。經驗豐富的開發人員可以將這本書作為從頭到尾的學習工具,或作為特定技術的便捷「即時」參考。
Angelika Langer 是一名自由作家和課程開發者。她曾是 Rogue Wave Software, Inc. 的高級培訓師/開發者,曾在 Siemens Nixdorf 領導 C++ 編譯器標準庫的開發,自 1993 年以來一直擔任 ISO/ANSI 標準委員會成員。
Klaus Kreft 是德國 Siemens Nixdorf Information Systems 的軟體架構師和高級顧問。他曾是俄勒岡州 Rogue Wave Software, Inc. 的高級培訓師/顧問。兩位作者共同為 Rogue Wave Software 開發了一門 STL 課程,並為《C++ Report》撰寫有關標準 C++ 庫的專欄。
目錄
前言
序言
讀者指南
第一部分:流的輸入和輸出
1. IOStreams 基礎
- 輸入和輸出
- 格式化輸入/輸出
- 預定義的全域流
- 輸入和輸出運算子
- 流的格式參數
- 操作符
- 流的地區
- 格式化輸入和輸出的比較
- 格式化輸入的特點
- 流狀態
- 流狀態標誌
- 檢查流狀態
- 捕獲流異常
- 重置流狀態
- 檔案輸入/輸出
- 創建、打開、關閉和銷毀檔案流
- 開啟模式
- 雙向檔案流
- 記憶體中的輸入/輸出
- 非格式化輸入/輸出
- 流定位
- 流的同步
- 同步的方式
- 通過 flush() 和 sync() 進行同步
- 使用 unitbuf 格式標誌進行同步
- 通過綁定流進行同步
- 同步預定義的標準流
- 預定義標準流之間的同步
- 與 C 標準 I/O 的同步
- 與外部設備的同步
- 窄字元和寬字元的預定義標準之間的同步
2. IOStreams 的架構
- 流類別
- 類別層次結構
- 流基類
- 一般流類別
- 具體流類別
- 流如何維護其流緩衝區
- 流的複製和賦值
- 流如何維護其地區
- 流、流緩衝區和地區之間的協作
- 流緩衝區類別
- 類別層次結構
- 流緩衝區抽象
- 字串流緩衝區
- 檔案流緩衝區
- 字元類型和字元特徵
- 字元表示
- 字元特徵
- 字元特徵類型的要求
- 檔案結束字元
- 字元的複製、查找和比較
- 轉換狀態
- 流位置
- 預定義的標準字元特徵
- 字元類型
- 字元類型的要求
- 流迭代器和流緩衝區迭代器
- 標準庫中的迭代器概念
- 流迭代器
- 輸出流迭代器
- 輸入流迭代器
- 流迭代器是單通道迭代器
- 流緩衝區迭代器
- 輸出流緩衝區迭代器
- 輸入流緩衝區迭代器
- 附加流存儲和流回調
- 附加流存儲
- 流回調
3. 高級 IOStreams 使用
- 用戶定義類型的輸入和輸出
- 插入器和提取器的簽名
- 首次插入器和提取器
- 精煉
- 格式控制
- 前綴和後綴操作
- 錯誤指示
- 國際化
- I/O 操作
- 精煉的插入器和提取器
- 國際化
- 前綴和後綴操作
- 格式控制
- 錯誤指示
- 使用精煉的插入器和提取器
- 通用插入器和提取器
- 簡單與精煉方法
- 用戶定義的操作符
- 無參數的操作符
- 有參數的操作符
- 直接的操作符實現
- 通用技術:使用操作符基模板
- 操作符實現的變體
- 精煉
- 帶有錯誤處理的操作符基模板
- 帶有狀態的操作符
- 標準操作符基類型 smanip
- 擴展流功能
- 將流存儲用於私用:iword、pword 和 xalloc
- 初始化和維護 iword/pword 索引
- 實現日期插入器
- 實現操作符
- 使用流回調進行記憶體管理
- 流回調函數的錯誤指示
- 擴展範例
- 使用新功能
- 評估 iword/pword 方法
- 通過派生創建新流類別
- 通過派生創建新流類別
- 實現日期插入器和操作符
- 實現日期插入器
- 實現操作符
- 使用新功能
- 總結
- 比較兩種解決方案——iword/pword 與派生
- 添加流緩衝區功能
- 從流緩衝區基類派生
- 流緩衝區的核心功能字元傳輸
- 用於無緩衝字元傳輸的流緩衝區
- 用於緩衝字元傳輸的流緩衝區
- 流緩衝區的可選功能
- 提供新流類別及新流緩衝區類別
- 從具體流緩衝區類別派生
第二部分:國際化
4. 國際化和本地化介紹
- 國際化和本地化
- 文化慣例
- 語言
- 數值
- 貨幣值
- 時間和日期
- 排序單詞
- 訊息
- 字元編碼
- 術語和定義
- 字元代碼集
- 字元編碼方案
- 日本多位元編碼方案
- 多位元編碼和寬字元的使用
- 代碼轉換
5. Locales
- 創建 Locale 物件
- 命名的 Locales
- 組合的 Locales
- 全域 Locale
- 從 Locale 獲取面向
- has_facet
- use_facet
6. 標準面向
- 與字母和語言相關的面向
- 字元分類
- 字元分類
- 字元轉換為大寫和小寫
- charT 和 char 之間的字元轉換
- ctype 的特殊屬性
- 字串排序
- 代碼轉換
- 訊息目錄
- 格式化和解析面向
- 數值和布林值
- numpunct 面向
- num_put 面向
- num_get 面向
- 貨幣值
- moneypunct 面向
- money_put 面向
- money_get 面向
- 日期和時間值
- time_put 面向
- time_get 面向
- 在 Locale 中的標準面向分組
- 標準面向系列
- 標準面向基類模板
- 按名稱派生的面向
- 基類面向的行為
- 強制面向類型
- Locale 類別
- 圖示:面向和類別
- 標準面向的高級使用
- 通過流間接使用面向
- 通過 Locale 使用面向
- 獨立於 Locale 直接使用面向
7. Locale 框架的架構
- 類別層次結構
- 在 Locale 中識別和查找面向
- 面向識別
- 面向查找
- 從 Locale 獲取面向
- 在 Locale 中存儲面向
- 使用兩階段多型的理由
- Locale 中面向的記憶體管理
- 面向引用計數器
- 面向的不可變性