Home | Modules | Class Hierarchy | Alphabetical List | Compound List | Related Pages

ParserFactory Class Reference
[Colorer interfaces]


Detailed Description

Maintains catalog of HRC and HRD references.

This class searches and loads catalog.xml file and creates HRCParser, StyledHRDMapper, TextHRDMapper and TextParser instances with information, loaded from specified sources.

If no path were passed to it's constructor, it uses the next search order to find 'catalog.xml' file:

Note:


Public Member Functions

 ParserFactory ()
 ParserFactory Constructor.
 ParserFactory (const String *catalogPath)
 ParserFactory Constructor with explicit catalog path.
const StringenumerateHRDClasses (int idx)
 Enumerates all declared hrd classes.
const StringenumerateHRDInstances (const String &classID, int idx)
 Enumerates all declared hrd instances of specified class.
const StringgetHRDescription (const String &classID, const String &nameID)
 Returns description of HRD instance, pointed by classID and nameID parameters.
HRCParsergetHRCParser ()
 Creates and loads HRCParser instance from catalog.xml file.
TextParsercreateTextParser ()
 Creates TextParser instance.
StyledHRDMappercreateStyledMapper (const String *classID, const String *nameID)
 Creates RegionMapper instance and loads specified hrd files into it.
TextHRDMappercreateTextMapper (const String *nameID)
 Creates RegionMapper instance and loads specified hrd files into it.
ErrorHandlergetErrorHandler ()
 Returns currently used global error handler.

Static Public Member Functions

static const char * getVersion ()


Constructor & Destructor Documentation

ParserFactory::ParserFactory  ) 
 

ParserFactory Constructor.

Searches for catalog.xml in the set of predefined locations

Exceptions:
ParserFactoryException If can't find catalog at any of standard locations.

ParserFactory::ParserFactory const String catalogPath  ) 
 

ParserFactory Constructor with explicit catalog path.

Parameters:
catalogPath Path to catalog.xml file. If null, standard search method is used.
Exceptions:
ParserFactoryException If can't load specified catalog.


Member Function Documentation

HRCParser * ParserFactory::getHRCParser  ) 
 

Creates and loads HRCParser instance from catalog.xml file.

This method can detect directory entries, and sequentally load their contents into created HRCParser instance. In other cases it uses InputSource::newInstance() method to create input data stream. Only one HRCParser instance is created for each ParserFactory instance.

StyledHRDMapper * ParserFactory::createStyledMapper const String classID,
const String nameID
 

Creates RegionMapper instance and loads specified hrd files into it.

Parameters:
classID Class identifier of loaded hrd instance.
nameID Name identifier of loaded hrd instances.
Exceptions:
ParserFactoryException If method can't find specified pair of class and name IDs in catalog.xml file

TextHRDMapper * ParserFactory::createTextMapper const String nameID  ) 
 

Creates RegionMapper instance and loads specified hrd files into it.

It uses 'text' class by default.

Parameters:
nameID Name identifier of loaded hrd instances.
Exceptions:
ParserFactoryException If method can't find specified pair of class and name IDs in catalog.xml file

ErrorHandler* ParserFactory::getErrorHandler  )  [inline]
 

Returns currently used global error handler.

If no error handler were installed, returns null.



Colorer-take5 Library. Copyright © 1999-2006 Igor Russkih.
Generated at Fri Nov 24 17:13:13 2006 by doxygen 1.4.6.