Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pgC_lib stdlibug 2.15 Differences between Standard and Rogue Wave IOStreams
Personal tools
Document Actions

2.15 Differences between Standard and Rogue Wave IOStreams



Click on the banner to return to the user guide home page.

2.15 Differences between Standard and Rogue Wave IOStreams

This section describes how the Rogue Wave implementation of the standard iostreams differs from the ISO/ANSI Standard C++ Library specification. You must be aware that whenever you use one of the features described here, the portability of your program will be impaired. It will not conform to the standard.

2.15.1 Extensions

Rogue Wave's implementation of the standard iostreams has several extensions that we will describe briefly in the sections below.

2.15.1.1 File Descriptors

The traditional iostreams allowed a file stream to connect to a file using a file descriptor. File descriptors are used by functions like open(), close(), read(), and write() that are part of most C libraries, especially on UNIX-based platforms. However, the ISO/ANSI standard for the programming language C and its library does not include these functions, nor does it mention file descriptors. In this sense, the use of file descriptors introduces platform and operating system dependencies into your program. This is exactly why the standard iostreams does not use file descriptors.

Now you might already have programs that use the file descriptor features of the traditional iostreams. And you may need to access system-specific files like pipes, which are accessible only through file descriptors. To address these concerns, Rogue Wave's implementation offers additional constructors and member functions in the file stream and file buffer classes that enable you to work with file descriptors.

The main additions are:

  • Constructors that take a file descriptor rather than a file name;

  • An additional third parameter that allows specification of file access rights. This parameter, available on several constructors and the open() member functions, is not available with the standard interface. The parameter has a default, so that you usually need not worry about file protection.

2.15.2 Restrictions

Rogue Wave's implementation of the standard iostreams has several restrictions, most of which correspond to the limited capabilities of current compilers in handling Standard C++. These restrictions include:

  • Member templates;

  • Explicit template argument specification (use_facet and has_facet in locale)

2.15.3 Deprecated Features

  • The strsteam classes



©Copyright 1996, Rogue Wave Software, Inc.


Powered by Plone This site conforms to the following standards: