Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classJsonListIterator.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:35:46 2014 Кодировка: Поисковые слова: hst |
![]() |
Stellarium 0.12.3
|
Qt-style iterator over a JSON array. More...
#include <StelJsonParser.hpp>
Public Member Functions | |
JsonListIterator (QIODevice *input) | |
Sets up JsonListIterator to read an array. More... | |
QVariant | next () |
Reads and parses the next object from input. More... | |
bool | hasNext () const |
Returns true if the next non-whitespace character is not a ']' character. More... | |
Qt-style iterator over a JSON array.
An actual list is not kept in memory, so only forward iteration is supported and all methods, including the constructor, involve read() calls on the QIODevice. Because of this, do not modify the QIODevice between calls to JsonListIterator methods. Also, the toFront() method has a special function and reset() is provided for convenience. Only peekNext() is guaranteed not to modify the QIODevice.
Definition at line 33 of file StelJsonParser.hpp.
JsonListIterator::JsonListIterator | ( | QIODevice * | input | ) |
Sets up JsonListIterator to read an array.
Swallows all whitespace up to a beginning '[' character. If '[' is not the first non-whitespace character encountered, reset() is called and an exception is thrown.
|
inline |
Returns true if the next non-whitespace character is not a ']' character.
Definition at line 48 of file StelJsonParser.hpp.
QVariant JsonListIterator::next | ( | ) |
Reads and parses the next object from input.
Advances QIODevice to just after the object.