Modified: incubator/stdcxx/trunk/doc/stdlibug/1-1.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-1.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-1.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-1.html Wed Jan 18 17:30:36 2006 @@ -3,12 +3,12 @@ Welcome -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.1 Welcome

-

Congratulations on choosing the Standard C++ Library Module, the Rogue Wave implementation of the Standard C++ Library. This module is part of SourcePro Core, an extensive set of fundamental C++ components. You can use this product with confidence: it is based on the final standard for the C++ language and library ratified in 1998 by the American National Standards Institute (ANSI) and the International Standards Organization (ISO).

+

Congratulations on choosing the C++ Standard Library Module, the Rogue Wave implementation of the C++ Standard Library. This module is part of SourcePro Core, an extensive set of fundamental C++ components. You can use this product with confidence: it is based on the final standard for the C++ language and library ratified in 1998 by the American National Standards Institute (ANSI) and the International Standards Organization (ISO).

Since its development by Dr. Bjarne Stroustrup in the 1980s, the C++ language has been widely used by professional programmers for the world's big, complex applications in telecommunications, finance, business, embedded systems, and computer-aided design. The final standardization of the C++ library now makes it easier to learn C++ and to use it across a wide variety of platforms.

-

Standardization improves portability and stability. You can build reliable applications faster, and maintain them with less cost and effort, using the Standard C++ Library.

+

Standardization improves portability and stability. You can build reliable applications faster, and maintain them with less cost and effort, using the C++ Standard Library.



Modified: incubator/stdcxx/trunk/doc/stdlibug/1-2.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-2.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-2.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-2.html Wed Jan 18 17:30:36 2006 @@ -3,11 +3,11 @@ Product Overview -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.2 Product Overview

1.2.1 Components

-

The Standard C++ Library is a large and comprehensive collection of classes and functions for fine-grained, low-level programming. Within this library, you will find the following components:

+

The C++ Standard Library is a large and comprehensive collection of classes and functions for fine-grained, low-level programming. Within this library, you will find the following components:

1.2.2 STL Not Object-Oriented

-

The STL portion of the Standard C++ Library is not object-oriented. If you are accustomed to the benefits of object-oriented programming, their absence may necessitate some adjustment. Encapsulation of data and functionality in objects is a hallmark of object-oriented programming. In the Standard C++ Library, however, the data structures are separate from the algorithms you use to manipulate them.

+

The STL portion of the C++ Standard Library is not object-oriented. If you are accustomed to the benefits of object-oriented programming, their absence may necessitate some adjustment. Encapsulation of data and functionality in objects is a hallmark of object-oriented programming. In the C++ Standard Library, however, the data structures are separate from the algorithms you use to manipulate them.

This feature can provide a number of advantages, such as smaller source code, and the flexibility of using algorithms with C++ pointers and arrays as well as conventional objects. It can also lead to more efficient coding and faster execution, since it creates a direct, nuts-and-bolts approach to solving problems.

-

The main disadvantage of using the Standard C++ Library directly is increased risk of error. For example, the library's iterators must not be mismatched or invalidated, and iterators in multithreaded environments should be wrapped before being shared among threads. The templates can cause less precise diagnostics, and code that grows unexpectedly large. Experience with the library and your own compiler will help diminish these problems.

+

The main disadvantage of using the C++ Standard Library directly is increased risk of error. For example, the library's iterators must not be mismatched or invalidated, and iterators in multithreaded environments should be wrapped before being shared among threads. The templates can cause less precise diagnostics, and code that grows unexpectedly large. Experience with the library and your own compiler will help diminish these problems.

1.2.3 Relationship to the Essential Tools Module

-

This Rogue Wave implementation of the Standard C++ Library is certified for use with the Essential Tools Module of SourcePro Core, which encapsulates the Standard C++ Library with an object-oriented interface. Used together, the Essential Tools and Standard C++ Library Modules are designed to provide the benefits of both low-level generic programming and object-orientation.

-

The Essential Tools Module also contains features not included in the standard, such as time, date, and regular expression classes, enhanced strings, hash containers, object persistence, and virtual streams. The Essential Networking Module of SourcePro Net extends the functionality of the Essential Tools Module with classes for network programming. For some programming tasks, you may find it easier and more convenient to use the Essential Tools and Essential Networking Modules without accessing the Standard C++ Library directly.

+

This Rogue Wave implementation of the C++ Standard Library is certified for use with the Essential Tools Module of SourcePro Core, which encapsulates the C++ Standard Library with an object-oriented interface. Used together, the Essential Tools and C++ Standard Library Modules are designed to provide the benefits of both low-level generic programming and object-orientation.

+

The Essential Tools Module also contains features not included in the standard, such as time, date, and regular expression classes, enhanced strings, hash containers, object persistence, and virtual streams. The Essential Networking Module of SourcePro Net extends the functionality of the Essential Tools Module with classes for network programming. For some programming tasks, you may find it easier and more convenient to use the Essential Tools and Essential Networking Modules without accessing the C++ Standard Library directly.



Modified: incubator/stdcxx/trunk/doc/stdlibug/1-3.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-3.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-3.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-3.html Wed Jan 18 17:30:36 2006 @@ -3,18 +3,18 @@ Usage Notes -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.3 Usage Notes

1.3.1 Compatibility Issues

-

This implementation of the Standard C++ Library conforms to ISO/IEC 14882:2003 -- International Standard for Information Systems -- Programming Language C++. This release is source compatible with previous 2.x implementations.

+

This implementation of the C++ Standard Library conforms to ISO/IEC 14882:2003 -- International Standard for Information Systems -- Programming Language C++. This release is source compatible with previous 2.x implementations.

1.x implementations of the library were based on ANSI's Working Paper for Draft Proposed International Standard for Information Systems -- Programming Language C++. The draft standard differs from the final standard in some areas. As a result, source written to 1.x implementations of the library will be incompatible with this implementation in these areas. See the readme file for details.

Please note that some compiler and library vendors have not yet implemented the whole range of language features defined by the ANSI/ISO standard.


-NOTE -- The Standard C++ Library is not yet fully implemented by all compilers. You may experience difficulty if you attempt to use features of the library that are unsupported by your compiler. +NOTE -- The C++ Standard Library is not yet fully implemented by all compilers. You may experience difficulty if you attempt to use features of the library that are unsupported by your compiler.

In the User's Guide, we draw your attention to places in the code where this might be a problem. If your vendor is still in the process of meeting the standard, some of the techniques demonstrated in this User's Guide may not work. We include them anyway to demonstrate the full range of capabilities of the standard C++ language. Compilers will catch up, and this guide will be more useful to you if it is as complete as possible.

1.3.2 The std Namespace

-

Everything in the Standard C++ Library Module is contained in the std namespace. You must specify a using directive or explicitly scope any name from the library.

+

Everything in the C++ Standard Library Module is contained in the std namespace. You must specify a using directive or explicitly scope any name from the library.

To use the vector class, for example, you could include one of the following using directives:


-NOTE -- To enhance this manual's readability, namespace scoping is usually omitted in the text. You should assume that everything in the Standard C++ Library Module is scoped in namespace std unless otherwise stated. +NOTE -- To enhance this manual's readability, namespace scoping is usually omitted in the text. You should assume that everything in the C++ Standard Library Module is scoped in namespace std unless otherwise stated.

Modified: incubator/stdcxx/trunk/doc/stdlibug/1-4.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-4.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-4.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-4.html Wed Jan 18 17:30:36 2006 @@ -3,14 +3,14 @@ Documentation Overview -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.4 Documentation Overview

1.4.1 Locations of Online Documentation

-

To help you learn to use the Standard C++ Library Module quickly and effectively, Rogue Wave provides the documentation described in Table 1.

+

To help you learn to use the C++ Standard Library Module quickly and effectively, Rogue Wave provides the documentation described in Table 1.

All Rogue Wave documentation is installed online when you install your product. In addition, printed copies of user's guides may be purchased from your sales representative.

For easiest access to the Rogue Wave online documentation, open the file buildspace\docs\index.html with your favorite browser, and follow the links to the documents you need.

-

Online documentation for the Standard C++ Library Module is available at the locations shown in Table 1.

+

Online documentation for the C++ Standard Library Module is available at the locations shown in Table 1.

Table 1: Locations of online documentation 

@@ -25,7 +25,7 @@

buildspace\docs\index.html

SourcePro documentation:

Introduction to SourcePro C++: buildspace\docs\html\startug\index.html

-

Standard C++ Library Module documentation:

+

C++ Standard Library Module documentation:

User's Guide: buildspace\docs\html\stdlibug\index.html

Reference Guide: buildspace\docs\html\stdlibref\index.html

RCB documentation:

Modified: incubator/stdcxx/trunk/doc/stdlibug/1-5.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-5.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-5.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-5.html Wed Jan 18 17:30:36 2006 @@ -3,19 +3,19 @@ About This Manual -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.5 About This Manual

1.5.1 Assumptions

This manual assumes that you are familiar with the basic features of the C++ programming language. If you are new to C++, you may want to start with an introductory text, such as The C++ Programming Language by Bjarne Stroustrup (Addison-Wesley, 1997).

1.5.2 Conventions

This manual uses some distinctive terms and conventions.

-

Abbreviations are common. Template abbreviations are very common, since the Standard C++ Library contains so many long names for class and function templates. For example, in the iostreams part of the documentation, fstream stands for template <class charT, class traits> class basic_fstream. The term filestream stands for the abstract notion of the file stream class template. badbit stands for the state flag std::ios_base::badbit.

+

Abbreviations are common. Template abbreviations are very common, since the C++ Standard Library contains so many long names for class and function templates. For example, in the iostreams part of the documentation, fstream stands for template <class charT, class traits> class basic_fstream. The term filestream stands for the abstract notion of the file stream class template. badbit stands for the state flag std::ios_base::badbit.

Hierarchy diagrams use the formal template declarations. In the hierarchy diagrams, the standard UML arrow:

indicates that class B inherits from class A.

-

The term algorithm indicates functions in the generic algorithms portion of the Standard C++ Library. This is intended to avoid confusion with member functions, argument functions, and user-defined functions.

+

The term algorithm indicates functions in the generic algorithms portion of the C++ Standard Library. This is intended to avoid confusion with member functions, argument functions, and user-defined functions.

An empty pair of parentheses () follows function names and algorithm names, so as to avoid emphasizing their arguments. Arguments may be omitted for clarity.

An underline character _ is used as a separator in both class names and function names.

Special fonts set off class names, code samples, and special meanings, as shown in Table 2:.

@@ -48,14 +48,14 @@

1.5.3 Organization

This manual is organized into eight parts:

1.5.4 Reading Suggestion

The first time you read this manual it may be hard to know where to start. The container definitions form the heart of the library, but you can't really appreciate them without understanding the algorithms that so greatly extend their functionality. On the other hand, you can't really understand the algorithms without some appreciation of the containers.

Modified: incubator/stdcxx/trunk/doc/stdlibug/1-6.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-6.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-6.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-6.html Wed Jan 18 17:30:36 2006 @@ -3,7 +3,7 @@ Consulting Services and Training -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.6 Consulting Services and Training

The Rogue Wave Technical Services group offers consulting for all levels of project development, from analysis and design to implementation. For more information on consulting services, contact your Rogue Wave account representative.

Modified: incubator/stdcxx/trunk/doc/stdlibug/1-7.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1-7.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1-7.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1-7.html Wed Jan 18 17:30:36 2006 @@ -3,7 +3,7 @@ Technical Support -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

1.7 Technical Support

For an outline of your specific Technical Support policies, please see your Rogue Wave License Agreement. Technical Support contracts can be purchased or upgraded through your Rogue Wave account representative.

Modified: incubator/stdcxx/trunk/doc/stdlibug/1.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/1.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/1.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/1.html Wed Jan 18 17:30:36 2006 @@ -3,7 +3,7 @@ Overview -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

Chapter 1: Overview

Returns true if the collection is empty

-

Elements of type T must be comparable to each other, either through the use of the default less-than operator, operator<(), or through a comparison function passed either as a template argument or as an optional argument on the constructor. The latter form will be illustrated in the example program provided later in this chapter. As with all the containers in the Standard C++ Library, there are several constructors. The default constructor requires either no arguments or the optional comparison function. An alternative constructor takes two iterators and initializes the values in the container from the range the iterators define. An optional third argument can be used to define the comparison function.

-

The priority_queue datatype is built on top of a container class, which is the structure actually used to maintain the values in the collection. There are two containers in the Standard C++ Library that can be used to construct priority_queues: vectors or deques. By default, a priority_queue will use vector.

+

Elements of type T must be comparable to each other, either through the use of the default less-than operator, operator<(), or through a comparison function passed either as a template argument or as an optional argument on the constructor. The latter form will be illustrated in the example program provided later in this chapter. As with all the containers in the C++ Standard Library, there are several constructors. The default constructor requires either no arguments or the optional comparison function. An alternative constructor takes two iterators and initializes the values in the container from the range the iterators define. An optional third argument can be used to define the comparison function.

+

The priority_queue datatype is built on top of a container class, which is the structure actually used to maintain the values in the collection. There are two containers in the C++ Standard Library that can be used to construct priority_queues: vectors or deques. By default, a priority_queue will use vector.

11.2.1 Declaration and Initialization of priority queue

The following illustrates the declaration of several priority_queues:

Modified: incubator/stdcxx/trunk/doc/stdlibug/11-3.html URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/doc/stdlibug/11-3.html?rev=370343&r1=370342&r2=370343&view=diff ============================================================================== --- incubator/stdcxx/trunk/doc/stdlibug/11-3.html (original) +++ incubator/stdcxx/trunk/doc/stdlibug/11-3.html Wed Jan 18 17:30:36 2006 @@ -3,7 +3,7 @@ Example Program: Event-Driven Simulation -Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library User's Guide
+Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

11.3 Example Program: Event-Driven Simulation

@@ -28,7 +28,7 @@

The simulation queue needs to maintain a collection of different types of events, sometimes called a heterogeneous collection. Each different form of event is represented by a subclass of class event, but not all events have the same exact type. For this reason the collection must store pointers to events, instead of the events themselves. Since the containers maintain pointers to values, not the values themselves, the programmer is responsible for managing the memory for the objects being manipulated.

-

Since comparison of pointers cannot be specialized on the basis of the pointer types, we must instead define a new comparison function for pointers to events. In the Standard C++ Library we do this by defining a new structure whose sole purpose is to define the function invocation operator()() in the appropriate fashion. Since in this particular example we want to use the priority_queue to return the smallest element each time, rather than the largest, the order of the comparison is reversed, as follows:

+

Since comparison of pointers cannot be specialized on the basis of the pointer types, we must instead define a new comparison function for pointers to events. In the C++ Standard Library we do this by defining a new structure whose sole purpose is to define the function invocation operator()() in the appropriate fashion. Since in this particular example we want to use the priority_queue to return the smallest element each time, rather than the largest, the order of the comparison is reversed, as follows: