xCHM  1.23
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HHCParser Class Reference

Fast index/contents file parser. More...

#include <hhcparser.h>

Public Member Functions

 HHCParser (wxFontEncoding enc, wxTreeCtrl *tree, CHMListCtrl *list)
 Constructor.
 
void parse (const char *chunk)
 Parse a chunk of data.
 

Private Member Functions

void handleTag (const std::string &tag)
 Handle a retrieved tag. I'm only interested in very few tags.
 
bool getParameters (const char *input, std::string &name, std::string &value)
 Retrieve a parameter name.
 
void addToTree (const wxString &name, const wxString &value)
 Add the information to the contents tree.
 
void addToList (const wxString &name, const wxString &value)
 Add the information to the index list.
 
wxString replaceHTMLChars (const wxString &input)
 Replace special HTML strings with correct code.
 
unsigned getHTMLCode (const wxString &name)
 HTML code for given name (if available)
 
 HHCParser (const HHCParser &)
 Prevent copying, we have an auto_ptr<> member.
 
HHCParseroperator= (const HHCParser &)
 Prevent copying, we have an auto_ptr<> member.
 

Private Attributes

int _level
 
bool _inquote
 
bool _intag
 
bool _inobject
 
std::string _tag
 
std::string _name
 
std::string _value
 
wxTreeCtrl * _tree
 
CHMListCtrl_list
 
wxTreeItemId _parents [TREE_BUF_SIZE]
 
wxFontEncoding _enc
 
int _counter
 
std::auto_ptr< wxCSConv > _cvPtr
 
bool _htmlChars
 

Detailed Description

Fast index/contents file parser.


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