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

HRCParser Class Reference
[Colorer interfaces]

Inheritance diagram for HRCParser:

HRCParserImpl

Detailed Description

Abstract template of HRCParser class implementation.

Defines basic operations of loading and accessing HRC information.


Public Member Functions

virtual void setErrorHandler (ErrorHandler *eh)=0
 Error Handler, used to inform application about different error conditions.
virtual void loadSource (InputSource *is)=0
 Loads HRC from specified InputSource stream.
virtual FileTypeenumerateFileTypes (int index)=0
 Enumerates sequentially all prototypes.
virtual FileTypegetFileType (const String *name)=0
virtual FileTypechooseFileType (const String *fileName, const String *firstLine, int typeNo=0)=0
 Searches and returns the best type for specified file.
virtual int getRegionCount ()=0
 Total number of declared regions.
virtual const RegiongetRegion (int id)=0
 Returns region by internal id.
virtual const RegiongetRegion (const String *name)=0
 Returns region by name.
virtual const StringgetVersion ()=0
 HRC base version.


Member Function Documentation

virtual void HRCParser::setErrorHandler ErrorHandler eh  )  [pure virtual]
 

Error Handler, used to inform application about different error conditions.

Parameters:
eh ErrorHandler instance, or null to drop error handling.

virtual void HRCParser::loadSource InputSource is  )  [pure virtual]
 

Loads HRC from specified InputSource stream.

Referred HRC file can contain prototypes and real types definitions. If it contains just prototype definition, real type load must be performed before using with loadType() method

Parameters:
is InputSource stream of HRC file

virtual FileType* HRCParser::enumerateFileTypes int  index  )  [pure virtual]
 

Enumerates sequentially all prototypes.

Parameters:
index index of type.
Returns:
Requested type, or null, if index is too big

virtual FileType* HRCParser::getFileType const String name  )  [pure virtual]
 

Parameters:
name Requested type name.
Returns:
File type, or null, there are no type with specified name.

virtual FileType* HRCParser::chooseFileType const String fileName,
const String firstLine,
int  typeNo = 0
[pure virtual]
 

Searches and returns the best type for specified file.

This method uses fileName and firstLine parameters to perform selection of the best HRC type from database.

Parameters:
fileName Name of file
firstLine First line of this file, could be null
typeNo Sequential number of type, if more than one type satisfy these input parameters.

virtual const Region* HRCParser::getRegion const String name  )  [pure virtual]
 

Returns region by name.

Note:
Also loads referred type, if it is not yet loaded.

virtual const String* HRCParser::getVersion  )  [pure virtual]
 

HRC base version.

Usually this is the 'version' attribute of 'hrc' element of the first loaded HRC file.



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