Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

26.6 An Example of a Derived Facet Class

As mentioned previously, the phone _put facet class is intended to serve as a base class. The facet does not format phone numbers in a locale-specific fasion.. Let's now present an example of a derived facet class, the US phone number formatting facet. This facet initializes the base class with the string "US" and its own locality, and the prefix for dialing foreign numbers, "011"; it works by default with the static country code table. Here is the class declaration for the facet:

Other concrete facet classes are built similarly.



Previous fileTop of DocumentContentsIndex pageNext file