GClasses
GClasses::GCharSet Class Reference

Detailed Description

This class represents a set of characters.

#include <GTokenizer.h>

Public Member Functions

 GCharSet (const char *szChars)
 szChars is an un-ordered set of characters (with no separator between them). The only special character is '-', which is used to indicate a range of characters if it is not the first character in the string. (So, if you want '-' in your set of characters, it should come first.) For example, the following string includes all letters: "a-zA-Z", and the following string includes all characters that might appear in a floating-point number: "-.,0-9e". (There is no way to include '\0' as a character in the set, since that character indicates the end of the string, but that is okay since '\0' should not occur in text files anyway, and this class is designed for parsing text files.) More...
 
bool find (char c)
 Returns true iff c is in the character set. More...
 

Protected Attributes

GBitTable m_bt
 

Friends

class GTokenizer
 

Constructor & Destructor Documentation

GClasses::GCharSet::GCharSet ( const char *  szChars)

szChars is an un-ordered set of characters (with no separator between them). The only special character is '-', which is used to indicate a range of characters if it is not the first character in the string. (So, if you want '-' in your set of characters, it should come first.) For example, the following string includes all letters: "a-zA-Z", and the following string includes all characters that might appear in a floating-point number: "-.,0-9e". (There is no way to include '\0' as a character in the set, since that character indicates the end of the string, but that is okay since '\0' should not occur in text files anyway, and this class is designed for parsing text files.)

Member Function Documentation

bool GClasses::GCharSet::find ( char  c)

Returns true iff c is in the character set.

Friends And Related Function Documentation

friend class GTokenizer
friend

Member Data Documentation

GBitTable GClasses::GCharSet::m_bt
protected