|
CartoType API
|
#include <cartotype_sax.h>
Public Types | |
| enum | TFeature { ENamespaces, ENamespacePrefixes, EValidation, EFeatureCount } |
Public Member Functions | |
| virtual CT_IMPORT | ~CXmlReader () |
| virtual MContentHandler & | ContentHandler ()=0 |
| virtual TResult | Parse (MInputStream &aStream)=0 |
| virtual void | SetContentHandler (MContentHandler *aContentHandler)=0 |
| virtual bool | Feature (TFeature aFeature) const =0 |
| virtual TResult | SetFeature (TFeature aFeature, bool aValue)=0 |
Static Public Member Functions | |
| static CT_IMPORT CXmlReader * | New (TResult &aError) |
An abstract base class for classes for reading an XML document using callbacks.
The purpose of this class is to hide the specific XML library (e.g., expat) and the glue code that connects CartoType code to it.
The feature interface works on numbers instead of strings compared to Java SAX.
Values for parser features.
| CT_EXPORT CXmlReader::~CXmlReader | ( | ) | [virtual] |
The virtual destructor ensures that the correct derived class destructor is called.
| virtual MContentHandler& CartoType::Sax::CXmlReader::ContentHandler | ( | ) | [pure virtual] |
Return the current content handler.
| virtual bool CartoType::Sax::CXmlReader::Feature | ( | TFeature | aFeature | ) | const [pure virtual] |
Look up the value of a feature flag.
| CT_EXPORT CXmlReader * CXmlReader::New | ( | TResult & | aError | ) | [static] |
Create an SVG interpreter. This function should be called by the handler of the containing XML document, when it finds the outermost <svg> tag. The SVG interpreter is created and aReader is switched to using it. When the matching closing </svg> tag is met the reader is switched back to the original handler, and the original handler's EndElement function is called to process it.
The width and height in the attributes can be overridden by passing values greater than 0 for aForcedWidth and aForcedHeight.
If aTransform is non-null it is used as the transform for the initial state.
If aGc is non-null the output is written to that graphics context.
A static function to create an XML reader.
| virtual TResult CartoType::Sax::CXmlReader::Parse | ( | MInputStream & | aStream | ) | [pure virtual] |
Parse an XML document.
| virtual void CartoType::Sax::CXmlReader::SetContentHandler | ( | MContentHandler * | aContentHandler | ) | [pure virtual] |
Set the content handler that is called by the parser.
| virtual TResult CartoType::Sax::CXmlReader::SetFeature | ( | TFeature | aFeature, |
| bool | aValue | ||
| ) | [pure virtual] |
Set the value of a feature flag.
1.7.5.1