Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_FormatAlex Class Reference

A class for parsing and analyzing the format string. More...

List of all members.

Public Types

enum  Tokens {
  Token_Unknown = -1, Token_EOS = 0, Token_Comment = 1, Token_CP_String,
  Token_Character, Token_DecimalInteger, Token_OctalInteger, Token_UnsignedDecimalInteger,
  Token_UnsignedHexaInteger, Token_UnsignedCAPSHexaInteger, Token_Double, Token_CAPSDouble,
  Token_Float, Token_FloatG, Token_FloatCAPSG, Token_Pointer,
  Token_String
}
enum  Modifiers {
  Modifier_None = 0, Modifier_Char, Modifier_Short, Modifier_Long,
  Modifier_LongLong, Modifier_LongDouble, Modifier_t, Modifier_j,
  Modifier_Size
}
enum  Flags {
  Flag_None = 0, Flag_LeftAlign = 0x0001, Flag_SignPrefix = 0x0002, Flag_ZeroPrefix = 0x0004,
  Flag_BlankPrefix = 0x0008, Flag_CrossPrefix = 0x0010, Flag_Thousands = 0x0020
}

Public Member Functions

Constructor/destructor
 CP_FormatAlex (const CP_String &formatString)
Token access
Tokens GetToken ()
const CP_FormatTokenGetTokenObject () const

Protected Attributes

CP_String fFormatString
CP_FormatToken fTokenObject

Private Member Functions

CPUniChar GetNextInputChar ()

Private Attributes

int fCurrentParameterOrder
CPUniChar fCurrentChar
UInt32 fPosition

Classes

class  CP_FormatToken
 A class that holds all the parameters of the token found in the format string. More...


Detailed Description

The CP_FormatAlex class parses the format string (same format string used by printf or sprintf) and breaks it into tokens.


Member Enumeration Documentation

enum CP_FormatAlex::Tokens
 

Enumeration values:
Token_Unknown 
Token_EOS 
Token_Comment 
Token_CP_String 
Token_Character 
Token_DecimalInteger 
Token_OctalInteger 
Token_UnsignedDecimalInteger 
Token_UnsignedHexaInteger 
Token_UnsignedCAPSHexaInteger 
Token_Double 
Token_CAPSDouble 
Token_Float 
Token_FloatG 
Token_FloatCAPSG 
Token_Pointer 
Token_String 

enum CP_FormatAlex::Modifiers
 

Enumeration values:
Modifier_None 
Modifier_Char 
Modifier_Short 
Modifier_Long 
Modifier_LongLong 
Modifier_LongDouble 
Modifier_t 
Modifier_j 
Modifier_Size 

enum CP_FormatAlex::Flags
 

Enumeration values:
Flag_None 
Flag_LeftAlign 
Flag_SignPrefix 
Flag_ZeroPrefix 
Flag_BlankPrefix 
Flag_CrossPrefix 
Flag_Thousands 


Constructor & Destructor Documentation

CP_FormatAlex::CP_FormatAlex const CP_String inFormatString  ) 
 

Constructor. This constructor creates an lexical analyzer to analyze the format string used in CP_String::StringWithFormat

Exceptions:
none 


Member Function Documentation

CP_FormatAlex::Tokens CP_FormatAlex::GetToken  ) 
 

Get the next token from the format string

It will also initialize the members of CP_FormatAlex with the current discovered token

Parameters:
none 
Exceptions:
none 
Returns:
Tokens the discovered token

const CP_FormatToken& CP_FormatAlex::GetTokenObject  )  const
 

CPUniChar CP_FormatAlex::GetNextInputChar  )  [private]
 


Member Data Documentation

CP_String CP_FormatAlex::fFormatString [protected]
 

CP_FormatToken CP_FormatAlex::fTokenObject [protected]
 

int CP_FormatAlex::fCurrentParameterOrder [private]
 

CPUniChar CP_FormatAlex::fCurrentChar [private]
 

UInt32 CP_FormatAlex::fPosition [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:46 2005 for CPLAT_MacOS by  doxygen 1.4.0