Table of Contents
Section 1: About Tools.h++
1.1 Overview and Features of Tools.h++
1.2 Tools.h++ and the C++ Philosophy
1.3 Tools.h++ and the Standardization of C++
1.3.1 Harnessing the Standard
1.3.2 What We Didn't Do
1.4 Reading This Manual
1.4.1 Special Conventions
1.5 Rogue Wave Professional Training
1.6 On-line Release Documentation
1.7 Technical Support
1.8 How to Contact Technical Support
Section 2: Class Overview
2.1 Concrete Classes
2.1.1 Simple Classes
2.1.2 Template-based Collection Classes
2.1.3 Generic Collection Classes
2.2 Abstract Base Classes
2.3 Smalltalk-like Collection Classes
2.4 Common Member Functions
2.4.1 Persistence
2.4.2 Store Size
2.4.3 Stream I/O
2.4.4 Comparisons
2.5 Memory Allocation and Deallocation
2.6 Information Flow
2.7 Multithread Safe
2.8 Eight-bit Clean
2.9 Embedded Nulls
2.10 Indexing
2.11 Version
Section 3: Using the String Classes
3.1 An Introductory Example
3.2 Lexicographic Comparisons
3.3 Substrings
3.4 Pattern Matching
3.4.1 Simple Regular Expressions
3.4.2 Extended Regular Expressions
3.5 String I/O
3.5.1 iostreams
3.5.2 Virtual Streams
3.6 Tokenizer
3.7 Multibyte Strings
3.8 Wide Character Strings
Section 4: Using Class RWDate
4.1 Example
4.2 Constructors
Section 5: Using Class RWTime
5.1 Setting the Time Zone
5.2 Constructors
5.3 Member Functions
Section 6: Using Virtual Streams
6.1 Specializing Virtual Streams
6.2 Simple Example
6.3 Windows Clipboard and DDE Streambufs
6.4 DDE Example
6.5 RWAuditStreamBuffer
6.6 Recap
Section 7: Using Class RWFile
7.1 Example
Section 8: Using Class RWFileManager
8.1 Construction
8.2 Member Functions
Section 9: Using Class RWBTreeOnDisk
9.1 Construction
9.2 Example
Section 10: Collection Classes
10.1 Storage Methods of Collection Classes
10.1.1 A Note on Memory Management
10.2 Copying Collection Classes
10.2.1 Copying Reference-based Collection Classes
10.2.2 Copying Value-based Collection Classes
10.3 Retrieving Objects in Collections
10.3.1 Retrieval Methods
10.4 Iterators in Collection Classes
10.4.1 Traditional Tools.h++ Iterators
Section 11: Collection Class Templates
11.1 Introduction
11.2 Template Overview
11.2.1 Template Naming Convention
11.2.2 Value vs. Reference Semantics in Templates
11.2.3 Intrusive Lists in Templates
11.3 Tools.h++ Templates and the Standard C++ Library
11.3.1 Standard C++ Library Not Required
11.3.2 The Standard C++ Library Containers
11.3.3 Commonality of Interface
11.4 Parameter Requirements
11.5 Function Objects for Comparison
11.5.1 More on Total Ordering
11.6 Function Objects for Hashing and Equality
11.7 Iterators
11.7.1 Standard C++ Library Iterators
11.7.2 Map-Based Iteration and Pairs
11.7.3 Iterators as Generalized Pointers
11.8 Iterators and the std() Gateway
11.9 The Best of Both Worlds
11.10 Using Templates Without the Standard Library
11.10.1 Keeping the Standard C++ Library in Mind for Portability
11.10.2 An Example
11.10.3 Another Example
11.11 Migration Guide: For Users of Previous Versions of Tools.h++
Section 12: Generic Collection Classes
12.1 Example
12.2 Declaring Generic Collection Classes
12.3 User-Defined Functions
12.3.1 Tester Functions
12.3.2 Apply Functions
Section 13: Smalltalk-Like Collection Classes
13.1 Tables of the Smalltalk-like Classes
13.2 Example
13.3 Choosing a Smalltalk-like Collection Class
13.3.1 Bags Versus Sets Versus Hash Tables
13.3.2 Sequenceable Classes
13.3.3 Dictionaries
13.4 Virtual Functions Inherited From RWCollection
13.4.1 insert()
13.4.2 find() and Friends
13.4.3 remove() Functions
13.4.4 apply() Functions
13.4.5 Functions clear() and clearAndDestroy()
13.5 Other Functions Shared by All RWCollections
13.5.1 Class Conversions
13.5.2 Inserting and Removing Other Collections
13.5.3 Selection
13.6 Virtual Functions Inherited from RWSequenceable
13.7 A Note on How Objects are Found
13.7.1 Hashing
Section 14: Persistence
14.1 Levels of Persistence
14.1.1 A Note About Terminology
14.1.2 About the Examples in this Section
14.2 No Persistence
14.3 Simple Persistence
14.3.1 Two Examples of Simple Persistence
14.4 Isomorphic Persistence
14.4.1 Isomorphic versus Simple Persistence
14.4.2 Isomorphic Persistence of a Tools.h++ Class
14.4.3 Designing Your Class to Use Isomorphic Persistence
14.4.4 Writing rwSaveGuts and rwRestoreGuts Functions
14.4.5 Isomorphic Persistence of a User-designed Class
14.5 Polymorphic Persistence
14.5.1 Operators
14.5.2 Designing your Class to Use Polymorphic Persistence
14.5.3 Polymorphic Persistence Example
14.6 A Few Friendly Warnings
14.6.1 Always Save an Object by Value before Saving the Identical Object by Pointer
14.6.2 Don't Save Distinct Objects with the Same Address
14.6.3 Don't Use Sorted RWCollections to Store Heterogeneous RWCollectables
14.6.4 Define All RWCollectables That Will Be Restored
Section 15: Designing an RWCollectable Class
15.1 Why Design an RWCollectable Class?
15.1.1 An Example of RWCollectable Classes
15.2 How to Create an RWCollectable Object
15.2.1 Define a Default Constructor
15.2.2 Add RWDECLARE_COLLECTABLE() to your Class Declaration
15.2.3 Provide a Class Identifier for Your Class
15.2.4 Add Definitions for Virtual Functions
15.2.5 Object Destruction
15.2.6 How to Add Polymorphic Persistence
15.2.7 A Note on the RWFactory
15.3 Summary
Section 16: Internationalization
16.1 Localizing Alphabets with RWCString and RWWString
16.2 Localizing Messages
16.3 Challenges of Localizing Currencies, Numbers, Dates, and Times
16.4 RWLocale and RWZone
16.4.1 Dates
16.4.2 Time
16.4.3 Numbers
16.4.4 Currency
16.4.5 A Note on Setting Environment Variables
Section 17: Error Handling
17.1 The Tools.h++ Error Model
17.2 Internal Errors
17.2.1 Non-recoverable Internal Errors
17.2.2 Recoverable Internal Errors
17.3 External Errors
17.4 Exception Architecture
17.4.1 Error Handlers
17.5 The Debug Version of Tools.h++
Section 18: Advanced Topics
18.1 Dynamic Link Library
18.1.1 The DLL Example
18.2 Copy on Write
18.2.1 A More Comprehensive Example
18.3 RWStringID
18.3.1 Duration of Identifiers
18.3.2 Programming with RWStringIDs
18.3.3 Implementation Details of RWStringID
18.4 More on Storing and Retrieving RWCollectables
18.5 Multiple Inheritance
Section 19: Common Mistakes
19.1 Redefinition of Virtual Functions
19.2 Iterators
19.3 Return Type of operator>>()
19.4 Avoid Persisting Value Collections of Pointers
19.5 Include Path
19.6 Match Memory Models and Other Qualifiers
19.7 Keep Related Methods Consistent
19.8 DLL
19.9 Use the Capabilities of the Library!
Appendix A: Choosing A Collection
A.1 Selecting a Tools.h++ Collection Class
A.1.1 How to Use the Decision Tree
A.1.2 Additional Selection Criteria
A.2 Time and Space Considerations
A.2.1 RWGVector, RWGBitVec, RWTBitVec<size>, RWTPtrVector, and RWTValVector
A.2.2 Singly Linked Lists
A.2.3 Doubly Linked Lists
A.2.4 Ordered Vectors
A.2.5 Sorted Vectors
A.2.6 Stacks and Queues
A.2.7 Deques
A.2.8 Binary Tree
A.2.9 (multi)map and (multi)set family
A.2.10 RWBTree, RWBTreeDictionary
A.2.11 Hash-based Collections
Appendix B: Typedefs and Macros
Appendix C: Messages
Appendix D: Bibliography
Topic Index
©Copyright 1999, Rogue Wave Software, Inc.
Send
mail
to report errors or comment on the documentation.