⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qxml.h

📁 著名的A780系列,E680系列的SDK开发包
💻 H
📖 第 1 页 / 共 2 页
字号:
    bool entityExist( const QString& ) const;    bool parseProlog();    bool parseElement();    bool parseElementEmptyTag( bool &t, QString &uri, QString &lname );    bool parseElementETagBegin2();    bool parseElementAttribute( QString &prefix, QString &uri, QString &lname );    bool parseMisc();    bool parseContent();    bool parsePI(bool xmldecl=FALSE);    bool parseDoctype();    bool parseComment();    bool parseName( bool useRef=FALSE );    bool parseNmtoken();    bool parseAttribute();    bool parseReference( bool &charDataRead, EntityRecognitionContext context );    bool processReference( bool &charDataRead, EntityRecognitionContext context );    bool parseExternalID( bool allowPublicID = FALSE );    bool parsePEReference( EntityRecognitionContext context );    bool parseMarkupdecl();    bool parseAttlistDecl();    bool parseAttType();    bool parseAttValue();    bool parseElementDecl();    bool parseNotationDecl();    bool parseChoiceSeq();    bool parseEntityDecl();    bool parseEntityValue();    bool parseString( const QString& s );    void reportParseError();    friend class QXmlSimpleReaderPrivate;    friend class QXmlLocator;};//// SAX Locator//class QM_EXPORT QXmlLocator{public:    QXmlLocator( QXmlSimpleReader* parent )    { reader = parent; }    ~QXmlLocator()    { }    int columnNumber();    int lineNumber();//    QString getPublicId()//    QString getSystemId()private:    QXmlSimpleReader* reader;    QXmlLocatorPrivate *d;};//// SAX handler classes//class QM_EXPORT QXmlContentHandler{public:    virtual void setDocumentLocator( QXmlLocator* locator ) = 0;    virtual bool startDocument() = 0;    virtual bool endDocument() = 0;    virtual bool startPrefixMapping( const QString& prefix, const QString& uri ) = 0;    virtual bool endPrefixMapping( const QString& prefix ) = 0;    virtual bool startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts ) = 0;    virtual bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName ) = 0;    virtual bool characters( const QString& ch ) = 0;    virtual bool ignorableWhitespace( const QString& ch ) = 0;    virtual bool processingInstruction( const QString& target, const QString& data ) = 0;    virtual bool skippedEntity( const QString& name ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlErrorHandler{public:    virtual bool warning( const QXmlParseException& exception ) = 0;    virtual bool error( const QXmlParseException& exception ) = 0;    virtual bool fatalError( const QXmlParseException& exception ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlDTDHandler{public:    virtual bool notationDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0;    virtual bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlEntityResolver{public:    virtual bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlLexicalHandler{public:    virtual bool startDTD( const QString& name, const QString& publicId, const QString& systemId ) = 0;    virtual bool endDTD() = 0;//    virtual bool startEntity( const QString& name ) = 0;//    virtual bool endEntity( const QString& name ) = 0;    virtual bool startCDATA() = 0;    virtual bool endCDATA() = 0;    virtual bool comment( const QString& ch ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlDeclHandler{public:    virtual bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ) = 0;    virtual bool internalEntityDecl( const QString& name, const QString& value ) = 0;    virtual bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0;    virtual QString errorString() = 0;};class QM_EXPORT QXmlDefaultHandler : public QXmlContentHandler, public QXmlErrorHandler, public QXmlDTDHandler, public QXmlEntityResolver, public QXmlLexicalHandler, public QXmlDeclHandler{public:    QXmlDefaultHandler() { }    virtual ~QXmlDefaultHandler() { }    void setDocumentLocator( QXmlLocator* locator );    bool startDocument();    bool endDocument();    bool startPrefixMapping( const QString& prefix, const QString& uri );    bool endPrefixMapping( const QString& prefix );    bool startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts );    bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName );    bool characters( const QString& ch );    bool ignorableWhitespace( const QString& ch );    bool processingInstruction( const QString& target, const QString& data );    bool skippedEntity( const QString& name );    bool warning( const QXmlParseException& exception );    bool error( const QXmlParseException& exception );    bool fatalError( const QXmlParseException& exception );    bool notationDecl( const QString& name, const QString& publicId, const QString& systemId );    bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName );    bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret );    bool startDTD( const QString& name, const QString& publicId, const QString& systemId );    bool endDTD();//    bool startEntity( const QString& name );//    bool endEntity( const QString& name );    bool startCDATA();    bool endCDATA();    bool comment( const QString& ch );    bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value );    bool internalEntityDecl( const QString& name, const QString& value );    bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId );    QString errorString();private:    QXmlDefaultHandlerPrivate *d;};#ifdef _WS_QWS_#ifdef QT_XML_CPP#define inline#else#define QT_NO_XML_INLINE#endif#endif#ifndef QT_NO_XML_INLINE//// inlines//inline bool QXmlSimpleReader::is_S(const QChar& ch){ return ch==' ' || ch=='\t' || ch=='\n' || ch=='\r'; }inline bool QXmlSimpleReader::is_Letter( const QChar& ch ){ return ch.isLetter(); }inline bool QXmlSimpleReader::is_NameBeginning( const QChar& ch ){ return ch=='_' || ch==':' || ch.isLetter(); }inline bool QXmlSimpleReader::is_Digit( const QChar& ch ){ return ch.isDigit(); }inline bool QXmlSimpleReader::is_CombiningChar( const QChar& ){ return FALSE; }inline bool QXmlSimpleReader::is_Extender( const QChar& ){ return FALSE; }inline bool QXmlSimpleReader::is_NameChar( const QChar& ch ){    return ch=='.' || ch=='-' || ch=='_' || ch==':' ||	is_Letter(ch) || is_Digit(ch) ||	is_CombiningChar(ch) || is_Extender(ch);}inline void QXmlSimpleReader::next(){    if ( !xmlRef.isEmpty() ) {	c = xmlRef[0];	xmlRef.remove( 0, 1 );    } else {	if ( c=='\n' || c=='\r' ) {	    lineNr++;	    columnNr = -1;	}	if ( pos >= xmlLength ) {	    c = QEOF;	} else {	    c = xml[pos];	    columnNr++;	    pos++;	}    }}inline bool QXmlSimpleReader::atEnd(){ return c == QEOF; }inline void QXmlSimpleReader::eat_ws(){ while ( !atEnd() && is_S(c) ) next(); }inline void QXmlSimpleReader::next_eat_ws(){ next(); eat_ws(); }// use buffers instead of QString::operator+= when single characters are readinline QString& QXmlSimpleReader::string(){    stringValue += QString( stringArray, stringPos );    stringPos = 0;    return stringValue;}inline QString& QXmlSimpleReader::name(){    nameValue += QString( nameArray, namePos );    namePos = 0;    return nameValue;}inline QString& QXmlSimpleReader::ref(){    refValue += QString( refArray, refPos );    refPos = 0;    return refValue;}inline void QXmlSimpleReader::stringClear(){ stringValue = ""; stringPos = 0; }inline void QXmlSimpleReader::nameClear(){ nameValue = ""; namePos = 0; }inline void QXmlSimpleReader::refClear(){ refValue = ""; refPos = 0; }inline void QXmlSimpleReader::stringAddC(){    if ( stringPos >= 256 ) {	stringValue += QString( stringArray, stringPos );	stringPos = 0;    }    stringArray[stringPos++] = c;}inline void QXmlSimpleReader::nameAddC(){    if ( namePos >= 256 ) {	nameValue += QString( nameArray, namePos );	namePos = 0;    }    nameArray[namePos++] = c;}inline void QXmlSimpleReader::refAddC(){    if ( refPos >= 256 ) {	refValue += QString( refArray, refPos );	refPos = 0;    }    refArray[refPos++] = c;}inline void QXmlSimpleReader::stringAddC(const QChar& ch){    if ( stringPos >= 256 ) {	stringValue += QString( stringArray, stringPos );	stringPos = 0;    }    stringArray[stringPos++] = ch;}inline void QXmlSimpleReader::nameAddC(const QChar& ch){    if ( namePos >= 256 ) {	nameValue += QString( nameArray, namePos );	namePos = 0;    }    nameArray[namePos++] = ch;}inline void QXmlSimpleReader::refAddC(const QChar& ch){    if ( refPos >= 256 ) {	refValue += QString( refArray, refPos );	refPos = 0;    }    refArray[refPos++] = ch;}#endif#ifdef _WS_QWS_#ifdef QT_XML_CPP#undef inline#endif#endif#endif //QT_NO_XML#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -