Contents


Preface
Guide to foundation services
CommonPoint information set
Getting started
Taxonomy
Developer guides
Usage and tools guidelines
Application documentation
Documented sample programs and sample code
Installation and late-breaking information
Typographical conventions
Reading notation diagrams
part 1 - Object storage
Collections
Understanding collections
Types of collections
Sequences
Dictionaries store key-value pairs
Dictionaries as lookup tables
Sets
Order of collection elements
Deque protocol supports stacks and queues
Ordered and unordered collections
Arrays and dictionaries are keyed collections
Priority queues: internal order and external order
Using collections
Creating an array
Creating a collection element
Collection constructor
Don't use default collection constructors
Adding elements
Add and AtPut
Indexing arrays with operator[]
Accessing elements
At
First
Last
Example program using Add, At, First, Last
Destroying collections
Searching for elements
Member
After and Before
Sample program using After, Before
Member
Sample program using Member
Comparing collection elements for equality
IsSame and IsEqual
Defining equality with comparators
Sample program using a comparator
Querying collection state
Count
OccurrencesOf
LowBound and HighBound
Sample program using Count, OccurrencesOf, LowBound, HighBound
Iteration
Types of iterators
A parameterized function to print collections
Sample program using printCollection
Removing elements
Sample program using Remove
Remove leaves holes in arrays
Destroying collections
Using comparators
With no comparator defined, equality is based on pointer addresses
Identity versus equality
Subclassing comparators
Comparators in context
Streamers
Comparators can determine order and relation in addition to equality
Comparator classes
Comparators and collection elements
Comparators for identifying collection elements
TMCollectibleComparator for sequences not depending on order
Sets without comparators appear to allow duplicate elements
Sample program using no comparator
Sets elements are not ordered
Without a comparator, objects created with new can't be equal
A comparator for text objects
TMCollectible Comparator for sets
Comparators for ordering collection elements
Sample program using a comparator for sorted sequences of text
Hashing, equality, and comparison
If hash values are not equal, elements are not equal
Defining a comparator to reverse sort order
Sample program using reversed-order comparator
Class for monitoring compare operations
Streams
Streams and persistent storage
What is streaming?
Stream classes
Virtual memory and streams
Using streams
Creating a TChunkyStream
Flattening an object to a stream
Resurrecting a stream
Retrieving stream positions
Flattening and resurrecting objects
Goals of stream protocol
Most classes must be streamable
Classes that do not need to be streamable
What you cannot stream
How to recognize non-streaming classes
Portions of instances t hat are not streamed
Items which are rebuilt when resurrecting a persistent object
Streaming operations
Write (>>=)
Reading (<<=)
Flatten
Resurrect
Combined example
Context for reading and writing streams: SetContext, GetContext
Freeze levels
Freeze level: same team
Freeze level: same session
Freeze level: deep freeze
Caveats: flattening and resurrecting template classes
Shared libraries, programs, and servers
Type information in shared libraries
Placing test code in shared libraries
Safe Pointers
Pointers and memory management
Types of safe pointers
Overview of safe pointers
Using safe pointers
Safe pointers as function parameters
TPointerTo<>
Declaration
Description
Exceptions
TAliasTo<>
Declaration
Description
TOnlyPointerTo<>
Declaration
Description
TInstanceOf<>
Declaration
Description
Persistent object storage
Persistent storage concepts
Keys are homogeneous
Values are heterogeneous
Persistent storage classes
TDiskDictionary class
TDiskSet class
Using persistent storage
Persistent storage model when adding a value
Creating a dictionary and adding key, value pairs
Counting the number of values in the dictionary
Iterating through a disk dictionary
Verifying membership of a key
Retrieving a value from the dictionary
Removing a value from the dictionary
Deleting the dictionary from memory and disk
Using the TDiskSet class
Sample program
Extending persistent storage
TRecordManager class
Sample code using hypothetical TSortedDiskDictionary class
part 2 - Identifiers
Properties
Understanding properties
Managing a heterogenous collection
TProperty classes
TPropertyID classes
Handling polymorphic class types
Evaluating equality within a collection
Accessing property values
Property iterators
Property queries
Memory management and multithread safety
Properties and attributes
Property interface classes
Properties
Property Identifiers
Miscellaneous classes
Using properties and property identifiers
Retrieving property values
Writing property values
Deleting properties
Other property actions
Using property collections
Using sets with members of the same type
Using sets with members of a different type
Using properties with a property identifier set
Using property identifiers with a property set
Iterating through property and property identifier sets
Defining property queries
Exception handling
Attributes
Attribute concepts
Attributes are named arbitrary data
Attributes can be grouped
Attributes are immutable, groups are not
Attributes can share data
You can share groups
Attributes and groups have value semantics, GroupHandles have reference semantics
Group attributes may be dynamically inherited from other groups
Group changes provide notification
The attribute model
Attribute classes
The attribute class
Internal attributes
Shared attributes
Attribute manager
Attribute group classes
Attribute groups
Simple attribute groups
Internal attribute group
Attribute group handles
Internal inheritable groups
Inheritable group handles
Design considerations
Do not use internal attributes if storage size is small
Reducing extra initialization with Finalize
Making global attributes
Multithreading attributes
Reducing attribute access time using categories
Batching change notification
Creating and using attributes
Using simple attribute groups
Accessing the data of an attribute held in a group
Using shared groups
Using inherited Groups
Defining new attribute classes
Deriving from TAttribute
TThicknessAttribute example
Interface
Implementation
Deriving from TSharedAttribute and TInternalAttribute
TDimensionAttribute example
Interface
Implementation
Defining a new AttributeGroupHandle and InternalAttributeGroup
part 3 - Numerical computation
Getting started with numerical programming
Road map
Sources
Standardization
Conformance
Types and operations
Floating-point types
Computational model
Special values
Non-stop operation
The floating-point environment
Headers
Programming examples
A sample library function
Computing ArcTanh
Inner products using wide accumulators
Using long double
A polynomial
Binary-decimal conversion
Arithmetic with NaNs
Filtering data containing NaNs
Arithmetic with infinities
Continued fractions with infinities
Interpreting the sign of zero
Testing x == y
Generating random numbers
Manipulating numbers without arithmetic
Financial calculations
Accumulating very long integers
Generating prime numbers
Hashing floating- point numbers
Floating-point data
Floating-point number systems
A hypothetical six-bit system
Facts about floating-point number systems
Units in the last place
Numbers and not-quite-numbers
Normal numbers
Signed zeroes
Subnormal numbers
Infinities
NaNs
Considering floating-point numbers as a subset of the real numbers
Numerical specifications of the floating-point types
Distinguishing the three long double formats
Encodings of the floating-point types
A bit-by-bit account of floating-point values
Byte order of data
Details of floating-point formats
Formats with an implicit leading bit
The lone explicit leading 1 bit
Manipulating floating-point values by the bit
Floating-point operations
The computational model
Why have a model?
Computing a result
A detailed example of underflow
Closure
Alternatives
Sign of zero
Rounding
Exceptions
Flags
C++ exceptions
Functions adhering to the model
Functions adhering to a relaxed specification
Examples of the computational model
One-third
Binary-decimal conversion
Massive cancellation
Rewriting mathematical expressions
Comparisons
Fused multiply-add
Log(1+e)
Sin(huge)
The numerical execution environment
The environment model
Statement of the model
The environment convention
Programming examples
Suppressing spurious signals
Changing state globally
Isolating the environment locally
Catching thrown exceptions
Testing for exceptions
The environment classes
TFPInactive-Environment
TFPEnvironment-Modifier
TFPEnvironmentScope
TFPEnvironment-SaveAndUpdate
Rounding modes and exception flags
Handling floating-point exceptions
Exception classes
Throwing exceptions manually
Exception handlers
Accessing the environment
Programming for portability
A catalog of system dependencies
The long double type
Expression evaluation
Widening of values
FPCE awareness
Expression evaluation pragmas
Hexadecimal loating constants
Efficiency of key macros
Support for NaNs and infinities in I/O
Pseudonyms
Overloaded functions
Object-oriented access to the environment
Underflow conditions
Accuracy of transcendental functions
Financial functions
Byte order
Signaling NaNs
Strategies for portability across CommonPoint platforms
Strategies for portability between CommonPoint and other platforms
Porting to a CommonPoint platform
Writing FPCE-compatible code
Standard C math.h compatibility
Numerical functions and classes
Specifying floating-point functions
Essential properties
Conventions
Permuted numerical function index
Global functions
Special cases for single-argument functions
Random numbers
TRandomDouble
TUniformRandom-Double
TRandomInteger
TUniformRandom-Integer
TRandomException
ARandom
Integer functions
Global functions
TPrimeException
Double long integers
Beyond the computational model
Features of IEEE standard arithmetic
Trapping
Signaling NaNs
Precision control
Unnormalized numbers
Correctly rounded results
Binary-decimal conversion
Transcendental functions
Argument reduction

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker