Re: [Libxmlplusplus-general] SAXParser: preventing expansion of predefined entities



On Wed, Dec 11, 2002 at 01:19:54PM +0100, Murray Cumming wrote:

> On Wed, 2002-12-11 at 13:09, Jonathan Wakely wrote:
> > Is there a good reason for this, or would you be willing to accept a
> > patch to (off the top of my head) make _callback_get_entity() call a
> > protected virtual function, so that derived classes can alter the
> > behaviour?
> 
> Yes, that callback should probably be like the others. It should call an
> on_get_entity() virtual function.

Cool. I've made exactly that change in my local copy, when I get a
chance later today I'll get checkout the CVS version and send you a
patch.

While I'm at it, I'm wondering why the callbacks say:

  SaxParser *parser = (SaxParser *) _parser;
  parser->on_start_document();

rather than the "proper C++" style

  SaxParser *parser = static_cast<SaxParser*>(_parser);
  parser->on_start_document();

or even (my personal preference), without the local variable

  static_cast<SaxParser*>(_parser)->on_start_document();

Is portablility to systems without static_cast<>() an issue?

Thanks,

jon


-- 
"Some men are born mediocre, some men achieve mediocrity,
 and some men have mediocrity thrust upon them."
	- Joseph Heller




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]