Ignore:
Timestamp:
Nov 18, 2013, 5:34:18 AM (6 years ago)
Author:
cameron
Message:

Changes to icxercesc files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icXML/icXML-devel/src/icxercesc/internal/XMLReader.hpp

    r3157 r3564  
    3636#include <icxmlc/XMLScanIterator.hpp>
    3737#include <icxmlc/XMLStreamIterator.hpp>
     38#include <icxmlc/bit_vector_t.hpp>
    3839#include <iostream>
    3940
     
    562563}
    563564
     565inline void XMLReader::getCurrentLineColumn(XMLFileLoc & line, XMLFileLoc & col) const
     566{
     567    line = fCurLine;
     568    col = fCurCol;
     569}
     570
    564571// ---------------------------------------------------------------------------
    565572//  XMLReader: Buffer management methods
     
    744751inline void XMLReader::normalizeEOL(XMLCh* const bufToFill, unsigned char* const charSizes, XMLSize_t & charsDone, XMLSize_t & bytesEaten)
    745752{
    746     ubitblock deletedAnyCharacters = {0};
     753    IntAlignedBitVector deletedAnyCharacters;
    747754    // do end-of-line normalization on the transcoded input data
    748755    XMLChIterator<chCR> crItr(bufToFill, charsDone);
     
    768775            {
    769776                // if we found a {CR,LF}, then mark the LF for deletion
    770                 #ifdef __ARCH_64
    771                 deletedAnyCharacters._64[pos >> CONST_LOG_2(64)] |= (static_cast<uint64_t>(1) << (pos & 63));
    772                 #else
    773                 deletedAnyCharacters._32[pos >> CONST_LOG_2(32)] |= (static_cast<uint32_t>(1) << (pos & 31));
    774                 #endif
     777                deletedAnyCharacters.insert(pos);
    775778            }
    776779        }
     
    794797            {
    795798                // if we found a {CR,LF} or a {CR,NEL}, then mark the LF/NEL for deletion
    796                 #ifdef __ARCH_64
    797                 deletedAnyCharacters._64[pos >> CONST_LOG_2(64)] |= (static_cast<uint64_t>(1) << (pos & 63));
    798                 #else
    799                 deletedAnyCharacters._32[pos >> CONST_LOG_2(32)] |= (static_cast<uint32_t>(1) << (pos & 31));
    800                 #endif
     799                deletedAnyCharacters.insert(pos);
    801800            }
    802801        }
     
    810809
    811810    // remove all deleted characters from the semi-final production
    812     if (unlikely(bitblock::any(deletedAnyCharacters._128)))
    813     {
    814         XMLStreamIterator itr(deletedAnyCharacters);
     811    if (unlikely(bitblock::any(deletedAnyCharacters._b)))
     812    {
     813        XMLStreamIterator itr(deletedAnyCharacters._b);
    815814        // get the position of the first deleted character
    816815        itr.next();
     
    853852        }
    854853        rawBufIndex -= offset;
    855         DEBUG_MESSAGE(" --- fRawBufIndex'=" << fRawBufIndex)
    856854    }
    857855    return rawBufIndex;
     
    862860XERCES_CPP_NAMESPACE_END
    863861
    864 #include <icxmlc/XMLParser.hpp>
     862#include <icxmlc/XMLParserImpl.hpp>
    865863
    866864XERCES_CPP_NAMESPACE_BEGIN
     
    875873
    876874    // construct the actual XMLParser object to parse the ELEMENT and MISC nodes
    877     XMLParserImpl<XMLScannerType> parser(scanner, fMemoryManager);
     875    XMLParserImpl<XMLScannerType> parser(*this, *scanner, fMemoryManager);
    878876
    879877    //  Scan the PROLOG part, which is everything before the root element
     
    944942
    945943    // construct the actual XMLParser object to parse the ELEMENT and MISC nodes
    946     XMLParserImpl<XMLScannerType> * parser = new XMLParserImpl<XMLScannerType>(scanner, fMemoryManager);
     944    XMLParserImpl<XMLScannerType> * parser = new XMLParserImpl<XMLScannerType>(*this, *scanner, fMemoryManager);
    947945
    948946    //  Scan the PROLOG part, which is everything before the root element
     
    10171015}
    10181016
    1019 inline
    1020 void XMLReader::getCurrentLineColumn(XMLFileLoc & line, XMLFileLoc & col) const
    1021 {
    1022         if (likely(fParser != NULL))
    1023         {
    1024                 fParser->getCurrentLineCol(line, col);
    1025         }
    1026         else // we're in Xerces prolog mode!
    1027         {
    1028                 line = fCurLine;
    1029                 col = fCurCol;
    1030         }
    1031 }
    1032 
    10331017void XMLReader::fill(XMLBuffer & toFill)
    10341018{
Note: See TracChangeset for help on using the changeset viewer.