Ipelib

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
ipe::ImlParser Class Reference
Ipe Utilities

`#include <ipeiml.h>`

Inherits ipe::XmlParser.

Inherited by PdfStreamParser, and PsStreamParser.

## Public Types

enum | Errors { ESuccess = 0, EVersionTooOld, EVersionTooRecent, ESyntaxError }

## Public Member Functions

| ImlParser (DataSource &source)
int | parseDocument (Document &doc)
bool | parsePage (Page &page)
Object * | parseObject (String tag, Page *page=0, int *currentLayer=0)
StyleSheet * | parseStyleSheet ()
bool | parseStyle (StyleSheet &sheet)
Page * | parsePageSelection ()
virtual Buffer | pdfStream (int objNum)
bool | parseBitmap ()
bool | parseFontmap (String *stdNames, String *paths)
Public Member Functions inherited from ipe::XmlParser
| XmlParser (DataSource &source)
virtual | ~XmlParser ()
int | parsePosition () const
String | parseToTag ()
bool | parseAttributes (XmlAttributes &attr, bool qm=false)
bool | parsePCDATA (String tag, String &pcdata)
bool | isTagChar (int ch)
void | getChar ()
bool | eos ()
void | skipWhitespace ()

## Additional Inherited Members

Protected Member Functions inherited from ipe::XmlParser
String | parseToTagX ()
Protected Attributes inherited from ipe::XmlParser
DataSource & | iSource
String | iTopElement
int | iCh
int | iPos

## Detailed Description

XML Parser for Ipe documents and style sheets.

A recursive descent parser for the XML streams.

After experimenting with various XML parsing frameworks, this turned out to work best for Ipe.

## Member Enumeration Documentation

enum ipe::ImlParser::Errors

Enumerator:

  ESuccess |
  EVersionTooOld |
  EVersionTooRecent |
  ESyntaxError |

## Constructor & Destructor Documentation

ImlParser::ImlParser | ( | DataSource & | source | ) |

explicit

## Member Function Documentation

int ImlParser::parseDocument | ( | Document & | doc | ) |

Read a complete document from IML stream.

Returns an error code.

bool ImlParser::parsePage | ( | Page & | page | ) |

Parse an Page.

On calling, stream must be just past `page`.

Object * ImlParser::parseObject | ( | String | tag,
|  | Page * | page = `0`,
|  | int * | currentLayer = `0`
| ) |  |

parse an Object.

On calling, stream must be just past the tag.

StyleSheet * ImlParser::parseStyleSheet | ( |  | ) |

parse a complete style sheet.

On calling, stream must be before the 'ipestyle' tag. A <?xml> tag is allowed.

bool ImlParser::parseStyle | ( | StyleSheet & | sheet | ) |

Parse a style sheet.

On calling, stream must be just past the style tag.

Page * ImlParser::parsePageSelection | ( |  | ) |

parse an `` <ipepage> element (used on clipboard).

Buffer ImlParser::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 ImlParser::parseBitmap | ( |  | ) |

Parse an Bitmap.

On calling, stream must be just past `bitmap`.

bool ipe::ImlParser::parseFontmap | ( | String * | stdNames,
|  | String * | paths
| ) |  |

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

- ipeiml.h
- ipeiml.cpp