Inherits IpeXmlParser.
Inherited by IpePdfStreamParser, and IpePsStreamParser.
A recursive descent parser for the Ipe XML streams.
After experimenting with various XML parsing frameworks, this turned out to work best for Ipe.
bool IpeImlParser::ParseDocument | ( | IpeDocument & | doc, | |
int & | requires | |||
) |
Read a complete Ipe document from IML stream.
Sets requires to the Ipelib version required by the document, e.g. 60100 for the Ipelib of Ipe 6.1. The version is not actually checked, so parsing continues (until an error occurs).
bool IpeImlParser::ParsePage | ( | IpePage & | page | ) |
Parse an IpePage.
On calling, stream must be just past page
.
Parse an IpeObject.
On calling, stream must be just past the tag.
IpeStyleSheet * IpeImlParser::ParseStyleSheet | ( | ) |
Parse a complete style sheet.
On calling, stream must be before the 'ipestyle' tag. A <?xml> tag is allowed.
bool IpeImlParser::ParseStyle | ( | IpeStyleSheet & | sheet, | |
bool | inDoc | |||
) |
Parse a style sheet.
On calling, stream must be just past the style tag.
bool IpeImlParser::ParseSelection | ( | IpePgObjectSeq & | seq | ) |
Parse an <ipeselection> element.
An IpePgObjectSeq is used to own the objects, but selection mode and layer are not set.
IpePage * IpeImlParser::ParsePageSelection | ( | ) |
Parse an <ipepage> element (used on clipboard).
IpeBuffer IpeImlParser::PdfStream | ( | int | objNum | ) | [virtual] |
XML contents can refer to data in PDF.
If the XML stream is embedded in a PDF file, XML contents can refer to PDF objects. A derived parser must implement this method to access PDF data.
It is assumed that PDF object objNum is a stream. Its contents (uncompressed!) is returned in a buffer.
bool IpeImlParser::ParseBitmap | ( | ) |
Parse an IpeBitmap.
On calling, stream must be just past bitmap
.