Using the C++ Standard Components

        The Standard Components Product
                Product History

Getting Started
                C++ Standard Components
                Relationship to the C++ Standard Library
                We provide general-purpose components
                You provide application-specific components
                How we decided what components to provide
        Who uses C++ Standard Components?
        A true story
                The String component
        Abstraction and simplification
                Array manipulation
                        Array reallocation errors
                        Algorithmic array errors
                Bit manipulation
        Component: a precise definition
                Component names and component documentation
        Compiling and Linking with C++ Standard Components
                Thread Safety
                Where Are Some Other Components?
        Naming Conventions
        Classification of components
                Simple types
                Low-level types
                Container types
        Treatment of errors
                Client errors
                Internal errors
        A bigger example
                Description of the problem
                Start by assembling the obvious components
                Reading the appointments
                Choosing a representation for the Calendar
                Choosing a representation for a day's appointments
                Implementing the queries
                Making the program robust and user-friendly
        Complete Electronic Calendar Program

The Design of C++ Standard Components
        Kinds of efficiency
        Execution speed
                Algorithms and data structures
                Techniques for speeding execution
                        Using inline functions
                        Using copy-avoidance techniques
                        Avoiding init objects
                        More about avoiding init objects
                        Not checking for client errors
                Avoiding language features with execution speed penalties
        Compilation time
                Minimizing interface dependencies
                Minimizing type conversions
                Breaking up large header files
        Executable size
                Minimizing inlines
                Minimizing linkage dependencies
                Minimizing the number of static objects defined in headers
        Inheritance: why we have mostly avoided it
                Two uses of inheritance
                        Using inheritance to factor out common code
                        Using inheritance to overcome problems in the type system

A Flexible UNIX Command Line Processing Facility - Args(3C++)
        Options and option values
        Multiple options:-I
        Suboptions: -D
        `+' options
        Keyword options
        Invocation errors
        The final program

No More Array Errors (Part I) - Block(3C++)
        What is array reallocation?
        Introduction to Block(3C++)
        Creating Blocks of a Given Size
        Other Bells and Whistles
        Accessing Block Elements
                How this is possible
        Changing Block Size
                The reserve operation
                The size operation

No More Array Errors (Part II) - Array_alg(3C++)
        Using Block(3C++) with Array Algorithms
        An array-based implementation of Set(3C++)
                The Array_set representation
                Array_set insertion
                Array_set membership
                Array_set removal
                Array_set relations
                Selecting an arbitrary Array_set element
                Array_set algebra
        Algorithm families

No More Memory Leaks - fs(3C++)
        The Problem
        fs to the Rescue
                Looking at the freestore
                Freestore events
        The Marriage of fs and Debuggers
                fs and UnixWare debug
                Program #1: A memory leak
                Program #2: Setting a watchpoint
        The Implementation

Using Simple Finite State Machines - Fsm(3C++)
        What is a Finite State Machine?
                A Simple Vending Machine
                A Simple Finite State Acceptor
                A Simple Translator
                A Simple Dynamically-Programmed Fsm
        Tracing Execution
        Displaying an Fsm in Human-Readable Form

G2++ Tutorial - G2++(3C++)
        The rationale for G2 (and G2++)
        A G2 Example
        Introduction to G2++
        G2++ Programming Language Interface
        Support for iostream(3C++)
        Support for String(3C++)
        Support for Vblock(3C++)
        Arbitrary Size Strings and Arrays
        The Initial Capacity of Strings and Arrays
        Pathological Record Definitions
        Using G2++ with User-Defined Types
                Record Definition
                Null Values
                Providing Inserters and Extractors for User-Defined Types
                Strings Containing Nonprintable Characters
                Stream Errors
                Adding Builtin C Types to the Repertoire of G2++ Types
        G2 Data Language Reference
                G2 Records
                Language Syntax
                Record Definition
                C Interface
                        Compiled Interface
                        Interpreted Interface
        Guidelines for Using G2

The C++ Graph Classes: A Tutorial - Graph(3C++) and Graph_alg(3C++)
        What is a Graph?
        Example: Manufacturing Process of a Widget
                Using the Graph Classes to Create Objects
                Creating, Inserting, Removing, and Destroying the User Graph Types
                Where is a Given Module Needed?
                Graphs and Sets
                Answering the Second Question: Which Modules are Immediately Needed to Compose Module K?
        The Graph Classes
                Graph Constructors and Destructors
                Graph Operators
                Graph Component Insertion and Removal
                Graph Information Retrieval
                Graph Subgraph Creation
                Vertex Constructors and Destructors
                Vertex Operators
                Vertex Information Retrieval
                Vertex Traversal Support
                Edge Constructors and Destructors
                Edge Operators
                Edge Information Retrieval
                Edge Traversal Support
        Graph Algorithms
        Source Code for the Widget Manufacturing Example (Complete Listing)

A List Class Library for C++ - List(3C++)
        What is a List?
        List declarations
        Operations on Lists
                Basic operations
                Sort operation
                Queue-oriented operations
                Element selection
                        Operator []
        List iterators
                List iterator declarations
                Operations on List iterators
                        Checking Current Position
                        Changing Current Position
                        Reading Elements from a List
                        Inserting and Deleting Elements
                Iterating over constant Lists

Associative Arrays in C++ - Map(3C++)
                An Example
        Defining Map Classes
                Key and Value Types
                Using a Map
                Copying a Map
                An Iterator Example
        Suggested Applications
        Implementation Notes and Warnings
        Another Example: Topological Sorting
                The Problem

An Objection Class for Rudimentary Error Handling - Objection(3C++)
        Objections for the Software Author
                Declaring and Instantiating Objections
                Raising Objections
                Instantiating Objections with a Default Action
                Documenting Software using Objections
        Objections for the Software Client
                Sustaining an Objection
                Ignoring an Objection
                Superseding an Objection
                Changing Actions Midstream
                Setjmp and Longjmp with Objections

A UNIX Path Name Library for C++ - Path(3C++)
        The class Path
        The basic operations
        The ksh ``test'' function
        Search paths

Fast Special-purpose Memory Allocation for C++ - Pool(3C++)
        The Pool Class
        Using the Pool Class
        Traps and Pitfalls

A Portable C++ Regular Expression Facility - Regex(3C++)
        Constructing and matching
        Invalid patterns
        More on matching
        Regex iteration
        A final example

Sets - Sets(3C++)
        A Set example
        A Bag example
        A Pointer set example
        Space-time tradeoffs
        Modifying elements in place
        Internal representation of Sets
        Symbol(3C++) as an application of sets

Measuring Program Execution Time with Stopwatch(3C++) - Stopwatch(3C++)
        The Stopwatch Analogy
                Stopwatch Status
                Setting Operations
                Reading Operations
        Getting Meaningful Stopwatch Measurements

No More String Errors - String(3C++)
                Basic Operations
                Queue-Oriented Operations
                Input and Output
                Element Selection and Substrings
                Comparison Operations
                String functions
                        UNIX System and Library Calls
                        Unsafe Programming with Strings
        Programming Examples

A Class for Efficient Key Lookup in C++ - Symbol(3C++)
        Symbol tables
        Remembering the hash
        A perfect hash
        Removing the baggage
        An example
        Summary comparison

No more ctime(3C) errors - Time(3C++)
        Introduction to Time(3C++)
        The relationship between Time, Place, and Duration
                Duration constants
                Functions for expressing Durations in natural units
                Component extractors
                Relational operators
                Fixed point arithmetic operators
                Approximate arithmetic operators
                Conversion to and from string
                Stream insertion
                Time constants
                Julian date operations
                Component extractors
                Day-of-week operations
                Relational operators
                Arithmetic operators
                Conversion to and from strings
                        Conversion from Time to String
                        Conversion from string to Time
                Stream insertion
                Conversion to and from time_t
                Auxiliary Time functions
        Error handling
                        Example 1: handling Duration::string_objection
                        Example 2: handling Time::environment_objection