File indexing completed on 2025-01-18 10:14:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #if !defined(XERCESC_INCLUDE_GUARD_WFXMLSCANNER_HPP)
0023 #define XERCESC_INCLUDE_GUARD_WFXMLSCANNER_HPP
0024
0025 #include <xercesc/internal/XMLScanner.hpp>
0026 #include <xercesc/util/ValueHashTableOf.hpp>
0027 #include <xercesc/util/ValueVectorOf.hpp>
0028 #include <xercesc/validators/DTD/DTDElementDecl.hpp>
0029
0030 XERCES_CPP_NAMESPACE_BEGIN
0031
0032
0033
0034
0035 class XMLPARSER_EXPORT WFXMLScanner : public XMLScanner
0036 {
0037 public :
0038
0039
0040
0041 WFXMLScanner
0042 (
0043 XMLValidator* const valToAdopt
0044 , GrammarResolver* const grammarResolver
0045 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0046 );
0047 WFXMLScanner
0048 (
0049 XMLDocumentHandler* const docHandler
0050 , DocTypeHandler* const docTypeHandler
0051 , XMLEntityHandler* const entityHandler
0052 , XMLErrorReporter* const errReporter
0053 , XMLValidator* const valToAdopt
0054 , GrammarResolver* const grammarResolver
0055 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0056 );
0057 virtual ~WFXMLScanner();
0058
0059
0060
0061
0062 virtual const XMLCh* getName() const;
0063 virtual NameIdPool<DTDEntityDecl>* getEntityDeclPool();
0064 virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
0065 virtual void scanDocument
0066 (
0067 const InputSource& src
0068 );
0069 virtual bool scanNext(XMLPScanToken& toFill);
0070 virtual Grammar* loadGrammar
0071 (
0072 const InputSource& src
0073 , const short grammarType
0074 , const bool toCache = false
0075 );
0076
0077 private :
0078
0079
0080
0081 WFXMLScanner();
0082 WFXMLScanner(const WFXMLScanner&);
0083 WFXMLScanner& operator=(const WFXMLScanner&);
0084
0085
0086
0087
0088 virtual void scanCDSection();
0089 virtual void scanCharData(XMLBuffer& toToUse);
0090 virtual EntityExpRes scanEntityRef
0091 (
0092 const bool inAttVal
0093 , XMLCh& firstCh
0094 , XMLCh& secondCh
0095 , bool& escaped
0096 );
0097 virtual void scanDocTypeDecl();
0098 virtual void scanReset(const InputSource& src);
0099 virtual void sendCharData(XMLBuffer& toSend);
0100 virtual InputSource* resolveSystemId(const XMLCh* const sysId
0101 ,const XMLCh* const pubId);
0102
0103
0104
0105
0106 void commonInit();
0107 void cleanUp();
0108
0109
0110
0111
0112 bool scanAttValue
0113 (
0114 const XMLCh* const attrName
0115 , XMLBuffer& toFill
0116 );
0117 bool scanContent();
0118 void scanEndTag(bool& gotData);
0119 bool scanStartTag(bool& gotData);
0120 bool scanStartTagNS(bool& gotData);
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137 unsigned int fElementIndex;
0138 RefVectorOf<XMLElementDecl>* fElements;
0139 ValueHashTableOf<XMLCh>* fEntityTable;
0140 ValueVectorOf<XMLSize_t>* fAttrNameHashList;
0141 ValueVectorOf<XMLAttr*>* fAttrNSList;
0142 RefHashTableOf<XMLElementDecl>* fElementLookup;
0143 };
0144
0145 inline const XMLCh* WFXMLScanner::getName() const
0146 {
0147 return XMLUni::fgWFXMLScanner;
0148 }
0149
0150
0151 XERCES_CPP_NAMESPACE_END
0152
0153 #endif