Aug - 05


Review by Dylan C., Teen Board Member: C++ Iostreams Handbook by Steve Teale () follows Justyce McAllister, who is at the top. Table of Contents. (All chapters, except Chapter 1, 7 and 21, conclude with a Summary.) 1. Introduction. 2. IOStreams Cookbook-Simple Input. book for students and as a holistic reference manual for professionals. The C++ . est are one-dimensional and multidimensional arrays, C strings, and class arrays. Chapter .. file iostream comprises conventions for input and output streams.

Author: Meztiran Zulkigar
Country: Cameroon
Language: English (Spanish)
Genre: Politics
Published (Last): 26 November 2004
Pages: 289
PDF File Size: 6.42 Mb
ePub File Size: 13.1 Mb
ISBN: 321-4-69058-929-5
Downloads: 97454
Price: Free* [*Free Regsitration Required]
Uploader: Megrel

Advanced Programer’s Guide and Reference Author: Angelika Langer and Klaus Kreft Publisher: While you can buy libraries like this now, at iostdeams point, you had to invent your own. Not having any idea of how to do this, I started searching for appropriate and useful literature.

Typical of most reference manuals, the information was there but in an almost unusable format. After reading this book, I understood how to create my own custom streambufistreamostreamand iostream classes.

I wrote my library, and miracle of miracles, it worked! Many of the original concepts still apply, but there are a plethora of new details and ideas that must be understood before the library handboook be used and extended effectively. Advanced Programmer’s Guide and Reference, is an excellent aid to understanding the architecture and uses of the new iostreams library.

The Book The book itself is pages long, divided into four parts. The first two parts comprise a programmer’s guide to iostreams and locales, iodtreams covers stream input and output and internationalization. The final part is a group of appendices that enhance the information given in the book.

The discussion ilstreams stream input and output is a very thorough explanation of how to use the stream classes.

It begins at the lowest level by discussing the difference between the formatting and transport layers of the library, and builds on this by discussing other usage issues like how to do formatted input and output, error detection and handling, and reading and writing from memory and files.

If you have no background in using streams at all, however, this book might start off a bit too quickly for you. In the Architecture portion of Part 1, the authors take a much closer look at the internals of the iostream library. They focus on the responsibilities and collaborations between the various classes of streams and streambufs, rather than the minutiae of each, individual class.

The examples given by the authors are well focused and do a good job of illustrating the points made in the text. I definitely agree with the authors’ focus on the collaborations between the parts rather than concentrating on individual classes. Although the details of each class are interesting and significant, the interactions between streams, streambufs, and locales are what is important.

That being said, my favorite part of this section was the excellent explanation of how streambufs work. In my mind, this is one of the most complicated, confusing, and yet important parts of the iostreams library.


iostreeams The interactions between the put and get areas, input and output for various kinds of transports, and locales and facets is fascinating, and this book contains perhaps the best explanation of this topic that I have ever seen. After talking about streams and streambufs, the book goes on to describe several topics new to this library: Each of these topics is developed as completely as streams and streambufs.

At the end of this chapter, I definitely had a better understanding of the internals of the iistreams library. The final section of Part 1 discusses advanced stream usage. This section begins by describing how to do input and output of user-defined types, starting with a very basic inserter and extractor for a Date class. User-defined manipulators are discussed next, followed by extension of stream and streambuf functionality through inheritance and aggregation.

Part 2 focuses on internationalization. I found this part a little harder to understand, undoubtedly due to my inexperience with the topic. In the end, however, I was able to understand and apply the concepts discussed.

As above, this section of the book begins with basic material, introducing the concepts of internationalization and localization. Continuing from this introduction, handboik authors discuss locales, which are the mechanism through which internationalization is implemented, and facets, which are the objects inside locales that do the actual localization work. The explanation of these basic topics builds from the basics to a more advanced level, accompanied by relevant examples throughout.

This introduction is followed by a section on the architecture of the locale framework.

C++ Iostreams Handbook

Again the concentration is on the relationships and collaborations involving locales and facets, rather than the individual classes.

The final topic covered in this part is user-defined facets; it describes how to add your own facet to an existing facet family, or how to add an entirely new cc family to a locale. Once again, the examples are excellent, adding clarity and detail to jostreams text. The reference section of the book follows the programmer’s guide. This page section is basically a hard copy of the standard iostreams and internationalization documentation, so it is typically terse, but informative.

Each group is given its own section that details the class declaration, necessary header files, and base classes, and a description of the class. This is followed by the definition of the class itself and detailed descriptions of the entire public interface, including related free functions and types. I used these reference pages quite extensively in developing a simple facet which I’ll be discussing shortly and I found them to be pretty useful. I sure would like to have them in Handobok form, though, so I could hyperlink between them, do searches, and cut and paste function declarations.

The final part of the book consists of the f. Several of the appendices habdbook with some of the previously developed topics, just in far greater detail, like how to parse and extract numeric and Boolean values from a stream.


C++ IOStreams Handbook – Steve Teale – Google Books

In fact, while developing my application, I found that several prominent vendors were seemingly unfamiliar with these same features! A Simple Example Although I sat down and read this book from cover to cover, it strikes me that most people won’t. They will use it as more of a tutorial and reference when they need to ipstreams about a particular topic.

Therefore, its usability as a reference text should really be part of this review as well. So to test this use case for the book, I decided to write a simple application. My sample implements a simple ROT algorithm. For those of you who aren’t familiar with this algorithm, it simply rotates a letter halfway through the standard English alphabet.

For instance, ROT would convert the text below:. So, I had a problem to solve, and this book was going to teach me how to do it. I knew that I wanted to convert characters from one representation to another, so that led me to believe that I wanted to use a facet. I looked in the Table of Contents for the book, and found the section on facets, then searched through there to find the codecvt facet.

I read the section describing codecvt and decided I was on the right track. I then went to the index to find related information on codecvtwhich led me to the reference section. Based on the class definition I found in the reference section, it was trivial to write the CaesarRotateFacet header see Listing 1.

When it came time to write a mainline for my program see Listing 3I knew I wanted to imbue a stream with my facet, and I was quickly able to look up how that was done.

Conclusion This is a good book. I think it can be read cover to cover, but it doesn’t have to be. It is eminently usable as a reference book, with a good Table of Contents and an excellent index. Iostrrams authors used tables effectively in the book to present sets of things like options, lists of facets, and flag names and values. I appreciated that Langer and Kreft presented more than just the nominal cases, and spent a lot of time talking about the exceptional cases.

It is these cases that are the hardest to handle, and that end up taking up the hancbook share of properly written, robust code. The class diagrams that were scattered throughout the book were informative, but not UML. That iostreamss the case, I was still able to read them, so I don’t consider this anything more than a nit.