Gel2D - The free/open source game creation suite

Public Member Functions
gel::GelChar Class Reference

ASCII character. More...

#include <gelChar.h>

List of all members.

Public Member Functions

 GelChar ()
 Default constructor.
 GelChar (char ch)
 ASCII character constructor.
bool isNull () const
 Checks if the character is NULL.
bool isDigit () const
 Checks if the character is a digit.
bool isLetter () const
 Checks if the character is a letter.
bool isPrint () const
 Checks if the character is printable.
bool isPunct () const
 Checks if the character is a punctutation mark.
bool isSpace () const
bool isSymbol () const
bool isCtrl () const
bool isUpper () const
 Checks if the character is an uppercase letter.
bool isLower () const
 Checks if the character is a lowercase letter.
GelChar toUpper () const
 Converts the character to an uppercase letter.
GelChar toLower () const
 Converts the character to a lowercase letter.
int toDigit () const
 Converts the character to a digit.
char toAscii () const
 Converts the character to an 8-bit char.
GelCharoperator= (const char c)
GelCharoperator= (const GelChar &ch)
bool operator== (const GelChar &ch) const
bool operator!= (const GelChar &ch) const
bool operator<= (const GelChar &ch) const
bool operator>= (const GelChar &ch) const
bool operator< (const GelChar &ch) const
bool operator> (const GelChar &ch) const

Detailed Description

ASCII character.


Constructor & Destructor Documentation

gel::GelChar::GelChar ( ) [inline]

Default constructor.

Constructs a NULL character ('\0').

gel::GelChar::GelChar ( char  ch) [inline]

ASCII character constructor.

Parameters:
ch: The ASCII character to assign.

Member Function Documentation

bool gel::GelChar::isNull ( ) const [inline]

Checks if the character is NULL.

Returns:
True if this is a NULL ('\0') character, else false.
bool gel::GelChar::isDigit ( ) const

Checks if the character is a digit.

Returns:
True if this is a digit (0 - 9), else false.
bool gel::GelChar::isLetter ( ) const

Checks if the character is a letter.

Returns:
True if this character is a letter (a-z, A-Z), else false.
bool gel::GelChar::isPrint ( ) const

Checks if the character is printable.

Returns:
True if this is a printable character, else false.
bool gel::GelChar::isPunct ( ) const

Checks if the character is a punctutation mark.

Returns:
True if this is a punctutation character, else false.
bool gel::GelChar::isSpace ( ) const
bool gel::GelChar::isSymbol ( ) const
bool gel::GelChar::isCtrl ( ) const
bool gel::GelChar::isUpper ( ) const

Checks if the character is an uppercase letter.

Returns:
True if this is an uppercase letter, else false.
bool gel::GelChar::isLower ( ) const

Checks if the character is a lowercase letter.

Returns:
True if this is a lowercase letter, else false.
GelChar gel::GelChar::toUpper ( ) const

Converts the character to an uppercase letter.

Returns:
The uppercase equivalent if the character is a lowercase letter, else the character itself.
GelChar gel::GelChar::toLower ( ) const

Converts the character to a lowercase letter.

Returns:
The lowercase equivalent if the character is an uppercase letter, else the character itself.
int gel::GelChar::toDigit ( ) const

Converts the character to a digit.

Returns:
The numerical equivalent if the character is a digit, else -1.
char gel::GelChar::toAscii ( ) const [inline]

Converts the character to an 8-bit char.

GelChar& gel::GelChar::operator= ( const char  c) [inline]
GelChar& gel::GelChar::operator= ( const GelChar ch) [inline]
bool gel::GelChar::operator== ( const GelChar ch) const [inline]
bool gel::GelChar::operator!= ( const GelChar ch) const [inline]
bool gel::GelChar::operator<= ( const GelChar ch) const [inline]
bool gel::GelChar::operator>= ( const GelChar ch) const [inline]
bool gel::GelChar::operator< ( const GelChar ch) const [inline]
bool gel::GelChar::operator> ( const GelChar ch) const [inline]

The documentation for this class was generated from the following file: