VR Juggler Portable Runtime

Programmer's Guide

Verrsion 1.0

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being Appendix B, GNU Free Documentation License, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in Appendix B, GNU Free Documentation License.

$Date: 2005-06-27 15:45:57 -0500 (Mon, 27 Jun 2005) $


Table of Contents

Vaporous Programming
I. Input/Output
1. Buffered I/O
Opening and Closing
Setting Attributes for Opening
Blocking Versus Non-Blocking
Reading and Writing
Statistics Collection
2. Sockets
Internet Addresses
Socket Commonalities
Uses of vpr::Socket
Fixed Blocking State
Datagram-Oriented Sockets
Stream-Oriented Sockets
The Acceptor/Connector Pattern
The Acceptor
The Connector
3. Serial Ports
Interface Overview
Abstraction Details
4. Data Marshaling
Endian Conversion
Object Serialization
II. Multi-Threading
5. Creating Threads
Threads: Using vpr::Thread
Creating Threads
Waiting for a Thread to Complete
Suspending and Resuming a Thread's Execution
Getting and Setting a Thread's Priority
Sending Signals to a Thread
Canceling a Thread's Execution
Requesting the Current Thread's Identifier
The Gory Details
Thread Functors
High-Level Description
vpr::ThreadMemberFunctor
vpr::ThreadRunFunctor
vpr::ThreadNonMemberFunctor
The Gory Details
6. Synchronization
Semaphores: Using vpr::Semaphore
High-Level Description
Creating a Semaphore
Locking a Semaphore
Releasing a Locked Semaphore
The Gory Details
Mutual Exclusion: Using vpr::Mutex
High-Level Description
Creating a Mutex
Locking a Mutex
Attempting to Lock a Mutex
Testing the State of a Mutex
Releasing a Locked Mutex
The Gory Details
Condition Variables: Using vpr::CondVar
High-Level Description
Creating a Condition Variable
Locking a Condition Variable
Releasing a Locked Condition Variable
Putting Condition Variables to Use
7. Signal Handling
III. Miscellaneous Utilities
8. Simulated Sockets
Sim Socket Interface
Sim Socket Implementation
9. Globally Unique Identifiers
GUID Creation
GUID Operations
10. Intervals
Interval Creation
Interval Operations
11. Singletons
12. Factories
13. Performance Monitoring
IV. Appendices
A. I/O Implementation Information
B. GNU Free Documentation License
PREAMBLE
APPLICABILITY AND DEFINITIONS
VERBATIM COPYING
COPYING IN QUANTITY
MODIFICATIONS
COMBINING DOCUMENTS
COLLECTIONS OF DOCUMENTS
AGGREGATION WITH INDEPENDENT WORKS
TRANSLATION
TERMINATION
FUTURE REVISIONS OF THIS LICENSE
ADDENDUM: How to use this License for your documents
Bibliography
Glossary of Terms
Index