function Class Reference

Inheritance diagram for function:

lowercase non_letter sanitizer

List of all members.

Public Member Functions

 function (std::locale loc)
 Cache the locale.
bool isalnum (char ch) const
char tolower (char ch) const


Detailed Description

Listing 40-5. Rewriting the sanitize Function as a Function Object Base class to hold a locale object.

Definition at line 69 of file word_count.cpp.


Member Function Documentation

bool function::isalnum ( char  ch  )  const [inline]

Test for alphanumeric

Parameters:
ch the character to test
Returns:
true if ch is alphanumeric in the locale

Definition at line 77 of file word_count.cpp.

Referenced by non_letter::operator()().

char function::tolower ( char  ch  )  const [inline]

Convert to lowercase

Parameters:
ch the character to convert
Returns:
the character ch in lowercase or ch unchanged if it has no lowercase equivalent.

Definition at line 82 of file word_count.cpp.

Referenced by lowercase::operator()().


The documentation for this class was generated from the following file:
Generated on Sun Nov 30 09:53:23 2008 for Exploring C++ - Final Forms of Key Examples by  doxygen 1.5.3