#include <ip2cparser.h>
Inheritance diagram for IP2CParser:Classes | |
| class | ConstructorDestructorParserStateSetter |
| Sets states for IP2C when being constructed and destructed. More... | |
| class | ParsingThread |
Signals | |
| void | parsingFinished (bool bSuccess) |
| A signal emitted when parser finishes its job. More... | |
Public Member Functions | |
| IP2CParser (IP2C *pTargetDatabase) | |
| IP2C * | ip2c () const |
| Retrieves the IP2C database this parser operates on. More... | |
| bool | isParsing () const |
| For multi-threading purposes. If this is true it is not recommended to delete this object nor the underlying IP2C database. More... | |
| bool | readDatabase (const QString &filePath) |
| void | readDatabaseThreaded (const QString &filePath) |
Protected Types | |
| typedef QHash< QString, QList< IP2C::IP2CData > > | Countries |
| typedef QHash< QString, QList< IP2C::IP2CData > >::const_iterator | CountriesConstIt |
| typedef QHash< QString, QList< IP2C::IP2CData > >::iterator | CountriesIt |
Protected Slots | |
| void | parsingThreadFinished () |
Protected Member Functions | |
| bool | doReadDatabase (const QString &filePath) |
| bool | readDatabaseVersion2 (const QByteArray &dataArray) |
Protected Attributes | |
| bool | bIsParsing |
| ParsingThread * | currentParsingThread |
| IP2C * | pTargetDatabase |
| Database to which the IP2C parser will save the data it retrieves from IP2C file. More... | |
| QMutex | thisLock |
Compacted database file format, version 2: (all strings are null terminated) Header:
Block repeated until EOF:
Definition at line 55 of file ip2cparser.h.
|
protected |
Key value is the abbreviation of the country name.
Definition at line 122 of file ip2cparser.h.
|
inline |
Retrieves the IP2C database this parser operates on.
Definition at line 65 of file ip2cparser.h.
|
inline |
For multi-threading purposes. If this is true it is not recommended to delete this object nor the underlying IP2C database.
Definition at line 71 of file ip2cparser.h.
|
signal |
A signal emitted when parser finishes its job.
It is not safe to delete IP2CParser object after readDatabase() call and before this signal is emitted.
|
protected |
Database to which the IP2C parser will save the data it retrieves from IP2C file.
Since IP2CParser is prepared to work in a separate thread it is not advised to delete the IP2C object before parsing is complete.
Definition at line 136 of file ip2cparser.h.