src/corelib/xml/qxmlstream.g
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   156 
   156 
   157     inline void reserve(int extraCapacity) {
   157     inline void reserve(int extraCapacity) {
   158         if (tos + extraCapacity + 1 > cap) {
   158         if (tos + extraCapacity + 1 > cap) {
   159             cap = qMax(tos + extraCapacity + 1, cap << 1 );
   159             cap = qMax(tos + extraCapacity + 1, cap << 1 );
   160             data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T)));
   160             data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T)));
       
   161             Q_CHECK_PTR(data);
   161         }
   162         }
   162     }
   163     }
   163 
   164 
   164     inline T &push() { reserve(1); return data[++tos]; }
   165     inline T &push() { reserve(1); return data[++tos]; }
   165     inline T &rawPush() { return data[++tos]; }
   166     inline T &rawPush() { return data[++tos]; }
   241     }
   242     }
   242 };
   243 };
   243 
   244 
   244 
   245 
   245 class QXmlStreamEntityResolver;
   246 class QXmlStreamEntityResolver;
   246 
   247 #ifndef QT_NO_XMLSTREAMREADER
   247 class QXmlStreamReaderPrivate : public QXmlStreamReader_Table, public QXmlStreamPrivateTagStack{
   248 class QXmlStreamReaderPrivate : public QXmlStreamReader_Table, public QXmlStreamPrivateTagStack{
   248     QXmlStreamReader *q_ptr;
   249     QXmlStreamReader *q_ptr;
   249     Q_DECLARE_PUBLIC(QXmlStreamReader)
   250     Q_DECLARE_PUBLIC(QXmlStreamReader)
   250 public:
   251 public:
   251     QXmlStreamReaderPrivate(QXmlStreamReader *q);
   252     QXmlStreamReaderPrivate(QXmlStreamReader *q);
   912 ./
   913 ./
   913 
   914 
   914 
   915 
   915 markup_list ::= markup_decl | space | pereference;
   916 markup_list ::= markup_decl | space | pereference;
   916 markup_list ::= markup_list markup_decl | markup_list space | markup_list pereference;
   917 markup_list ::= markup_list markup_decl | markup_list space | markup_list pereference;
       
   918 markup_list ::=;
   917 
   919 
   918 markup_decl ::= element_decl | attlist_decl | entity_decl | entity_done | notation_decl | processing_instruction | comment;
   920 markup_decl ::= element_decl | attlist_decl | entity_decl | entity_done | notation_decl | processing_instruction | comment;
   919 
   921 
   920 
   922 
   921 element_decl_start ::= langle_bang ELEMENT qname space;
   923 element_decl_start ::= langle_bang ELEMENT qname space;
  1838             break;
  1840             break;
  1839         }
  1841         }
  1840     }
  1842     }
  1841     return false;
  1843     return false;
  1842 }
  1844 }
  1843 ./
  1845 #endif //QT_NO_XMLSTREAMREADER.xml
       
  1846 
       
  1847 ./