As mentioned previously, the phone number facet class is intended to serve as a base class. Let's now present an example of a derived facet class, the US phone number formatting facet. It works by default with the static country code table and "US" as its own locality. It also knows the prefix for dialing foreign numbers from the US. Here is the class declaration for the facet:
class US_phone_put : public phone_put { public: US_phone_put( const prefixMap_t* tab=0 , const string_t& myCod = "US" , bool del = false , size_t refs = 0) : phone_put(myCod,"011",tab,del,refs) { } };
Other concrete facet classes are built similarly.
OEM Edition, ©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.