Summary:
* Generalized ContentHandler, ErrorHandler, and LexicalHandler implementations in test to not care about which interface is used. * Implemented SAX.*Handler interfaces by calling into these generalized functions. * Implemented VBSAX.*Handler interfaces the same way. * Added vb_reader_support_data using VB interface IID_IVBSAXXMLReader. * Added a data structure containing both reader_support_data and vb_reader_support_data. This is iterated over first in test_saxreader().
The tests generally run.
thanks, Jefferson
On 10/8/21 11:05 AM, Jefferson Carpenter wrote:
Summary:
- Generalized ContentHandler, ErrorHandler, and LexicalHandler
implementations in test to not care about which interface is used.
- Implemented SAX.*Handler interfaces by calling into these
generalized functions.
- Implemented VBSAX.*Handler interfaces the same way.
I think you could simply implement test handler objects that support both interfaces, and switch between them using some flag.
- Added vb_reader_support_data using VB interface IID_IVBSAXXMLReader.
- Added a data structure containing both reader_support_data and
vb_reader_support_data. This is iterated over first in test_saxreader().
Is that necessary? Support data is meant for version-specific classes. For SAXReader, it's never a situation when you can create C++ interface, and not VB interface.
The tests generally run.
thanks, Jefferson
On 10/8/2021 8:38 AM, Nikolay Sivov wrote:
I think you could simply implement test handler objects that support both interfaces, and switch between them using some flag.
It looks like which content handler is used (SAX... or VBSAX...) depends on which interface the reader parse call is made through (ISAXXMLReader_parse or IVBSAXXMLReader_parse). So a flag can be used to switch between these reader interfaces, however each needs the correct content handler assigned to it.
Is that necessary? Support data is meant for version-specific classes. For SAXReader, it's never a situation when you can create C++ interface, and not VB interface.
Turns out it's not necessary. I'm not sure why, but during testing I thought I needed to get support for VB interfaces as well.