Public Member Functions | Static Public Member Functions | Protected Member Functions

hipp::SVGHandler Class Reference

#include <SVGHandler.h>

List of all members.

Public Member Functions

 SVGHandler (void)
 ~SVGHandler (void)
virtual void startDocument ()
virtual void endDocument ()
virtual void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const xercesc::Attributes &attrs)
 Handles the beginning of an element.
virtual void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
virtual void characters (const XMLCh *const chars, const XMLSize_t length)
void warning (const SAXParseException &exc)
void error (const SAXParseException &exc)
void fatalError (const SAXParseException &exc)
list< HippShape * > getShapes () const

Static Public Member Functions

static string toNativeString (const XMLCh *str)
static string toLowerNativeString (const XMLCh *str)

Protected Member Functions

template<typename T >
createShape (const xercesc::Attributes &attrs, ShapeType type)

Constructor & Destructor Documentation

SVGHandler::SVGHandler ( void   ) 
SVGHandler::~SVGHandler ( void   ) 

Member Function Documentation

void SVGHandler::characters ( const XMLCh *const   chars,
const XMLSize_t  length 
) [virtual]
template<typename T >
T SVGHandler::createShape ( const xercesc::Attributes &  attrs,
ShapeType  type 
) [protected]

Protected functions for creating shapes

void SVGHandler::endDocument (  )  [virtual]
void SVGHandler::endElement ( const XMLCh *const   uri,
const XMLCh *const   localname,
const XMLCh *const   qname 
) [virtual]
void SVGHandler::error ( const SAXParseException &  exc  ) 
void SVGHandler::fatalError ( const SAXParseException &  exc  ) 
list<HippShape*> hipp::SVGHandler::getShapes (  )  const [inline]
void SVGHandler::startDocument (  )  [virtual]
void hipp::SVGHandler::startElement ( const XMLCh *const   uri,
const XMLCh *const   localname,
const XMLCh *const   qname,
const xercesc::Attributes &  attrs 
) [virtual]

Handles the beginning of an element.

Todo:
There is actually a much better implementation of this. SVGHandler should maintain a list of startElement handlers and for each element it should simply call the handler function. If the handler deals with it, it returns true and the propagation is terminated. This should function much like event handling in wx. It would eliminate all of the ridiculous switching and allow shapes to capture paths that resemble them.
static string hipp::SVGHandler::toLowerNativeString ( const XMLCh *  str  )  [inline, static]
static string hipp::SVGHandler::toNativeString ( const XMLCh *  str  )  [inline, static]
void SVGHandler::warning ( const SAXParseException &  exc  ) 

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines