DtdManager

The DtdManager class keeps a cache of parsed DTDs and style sheets. More...

Publicly inherits QObject.

Public Methods

DtdManager( );
voidclear( );
Dtd*find( QString dtdName );
voidrequest( QObject* parser, QString doctype, QString id );
~DtdManager( );

Public Slots

voiddone( Dtd* dtd );

Private Methods

Dtd*findDtd( const QString& soi );

Signals

voiddtdReady( Dtd* dtd );

Private Data Members

QList<Dtd>_dtds;
QList<Parser>_parsers;
QList<DtdRequest>_requests;

Detailed Documentation

The DtdManager class keeps a cache of parsed DTDs and style sheets.

Any object that inherits from QObject can request a DTD from the DtdManagerm provided that it has a dtd( Dtd* ) slot. The slot is required because requests are processed asynchronously. This allows DTDs and style sheets to be retrieved from remote servers with non-blocking I/O.

Public Methods Documentation

DtdManager ( );

Create a new DtdManager.

void clear ( );

Clear the DTD cache.

Dtd* find ( QString dtdName );

Lookup a DTD in the cache of parsed DTDs, with the given public identifier.

void request ( QObject* parser, QString doctype, QString id );

Process a request for the DTD with the given public identifier.

~DtdManager ( );

Destroy the DtdManager and its cache of DTDs.

Public Slots Documentation

void done ( Dtd* dtd );

This slot process the indication from the DtdParser that the DTD and its style sheet are ready.

Signals Documentation

void dtdReady ( Dtd* dtd );

This signal is emitted when a request DTD and its style sheet have been parsed. This signal is connected and disconnect when needed, so that it works like a dynamically bound function call. This way many differnet types of objects can request a DTD without being derived from a more specific class than QObject.


Return to Index.
Automatically generated on Aug 11 23:32