29 #include "qtprotobufglobal.h"
33 namespace QtProtobuf {
43 , m_containerSize(container.size())
44 , m_it(container.begin()) {}
47 , m_containerSize(other.m_containerSize)
49 if (m_sizeLeft > m_containerSize || m_sizeLeft < 0) {
50 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
54 explicit operator QByteArray::const_iterator&() {
return m_it; }
55 explicit operator QByteArray::const_iterator()
const {
return m_it; }
57 char operator *() {
return *m_it; }
62 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
70 if (m_sizeLeft > m_containerSize) {
71 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
80 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
88 if (m_sizeLeft > m_containerSize) {
89 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
100 m_containerSize = other.m_containerSize;
101 m_sizeLeft = other.m_sizeLeft;
102 if (m_sizeLeft > m_containerSize || m_sizeLeft < 0) {
103 throw std::out_of_range(
"Container is less than required fields number. Deserialization failed");
110 return other.m_it == m_it;
114 return other.m_it != m_it;
117 bool operator ==(
const QByteArray::const_iterator &other)
const {
118 return other == m_it;
121 bool operator !=(
const QByteArray::const_iterator &other)
const {
122 return other != m_it;
125 const char *data()
const {
135 QByteArray::const_iterator m_it;
140 return itNew += lenght;
The QProtobufSelfcheckIterator class.
Definition: qprotobufselfcheckiterator.h:40