|
pwfengine
|
An abstract wrapper. It is associated to an url and has a schema that can be automatically detected. More...
#include <PWrapper.h>
Public Member Functions | |
| PWrapper (PEngine *engine, PWrapper *parent) | |
| PEngine * | engine () const |
| PWrapper * | parentWrapper () |
| bool | setName (QString wrapperName) |
| QString | name () const |
| void | setUrl (QString url) |
| QString | url () const |
| void | setSchemaCandidatesDirectory (const QString &directoryPath) |
| QString | schemaCandidatesDirectory () |
| PAction * | setSchema (const QString &schemaName) |
| PAction * | detectSchema () |
| PSchema * | schema () const |
| QString | schemaName () const |
| virtual QString | schemaFileName (const QString &schemaName)=0 |
| TEvalWrapperData * | evalData (const QString &name) |
Protected Member Functions | |
| PWrapperElement * | rootElement () |
| virtual QList< QString > | schemaCandidateNames ()=0 |
| virtual QString | cacheFileName ()=0 |
Protected Attributes | |
| PWrapperPrivate * | d |
Friends | |
| class | PWrapperPrivate |
An abstract wrapper. It is associated to an url and has a schema that can be automatically detected.
Each wrapper is univocally identified by its name that must be setted as soon as having created the wrapper. Two wrappers referring to different urls but having the same name will be treated as the same and so will share the same cache.
| virtual QString PWrapper::cacheFileName | ( | ) | [protected, pure virtual] |
Implemented in PPageWrapper, and PSiteWrapper.
| PAction * PWrapper::detectSchema | ( | ) |
Automatically detect a valid schema for this wrapper by checking all the schema names returned by the schemaCandidateNames() method.
| TEvalWrapperData* PWrapper::evalData | ( | const QString & | name | ) |
| PWrapperElement * PWrapper::rootElement | ( | ) | [protected] |
| virtual QList<QString> PWrapper::schemaCandidateNames | ( | ) | [protected, pure virtual] |
Return a list containing the names of the schemas that must be checked by the detectSchema() method.
Implemented in PPageWrapper, and PSiteWrapper.
| QString PWrapper::schemaCandidatesDirectory | ( | ) |
| virtual QString PWrapper::schemaFileName | ( | const QString & | schemaName | ) | [pure virtual] |
Given a schema name, return the filename of the schema. If the schema name is not valid, return an empty string.
Implemented in PPageWrapper, and PSiteWrapper.
| QString PWrapper::schemaName | ( | ) | const |
| bool PWrapper::setName | ( | QString | wrapperName | ) |
The name must match the pattern [a-z0-9 -!#$%^()]+
| PAction * PWrapper::setSchema | ( | const QString & | schemaName | ) |
Set the wrapper schema specifying its name (e.g. phpbb3). The library will in turn locate the file. This is the only method the user can use to 'directly' set the wrapper schema, this allow to set only schemas that are in the wrapper schemas folder.
| void PWrapper::setSchemaCandidatesDirectory | ( | const QString & | directoryPath | ) |
Set the directory where are located all the wrapper schemas. Overwrite the directory setted in the PEngine. Note: the final / is removed
| void PWrapper::setUrl | ( | QString | url | ) |
Set the wrapper target url
| QString PWrapper::url | ( | ) | const |
Return the wrapper target url
1.7.4