Grantlee  5.1.0
Public Member Functions | List of all members
Grantlee::TagLibraryInterface Class Reference

The TagLibraryInterface returns available tags and filters from libraries. More...

#include <grantlee/taglibraryinterface.h>

Public Member Functions

virtual QHash< QString, Filter * > filters (const QString &name=QString())
 
virtual QHash< QString, AbstractNodeFactory * > nodeFactories (const QString &name=QString())
 

Detailed Description

This interface must be implemented in tag and filter libraries.

The implementation will usually be very simple.

class MyTagLibrary : public QObject, public TagLibraryInterface
{
Q_OBJECT
public:
MyTagLibrary( QObject *parent = 0 )
: QObject( parent ) {
}
QString() ) {
Q_UNUSED( name );
nodeFactories.insert( "mytag1", new MyTag1() );
nodeFactories.insert( "mytag2", new MyTag2() );
return nodeFactories;
}
Q_UNUSED( name );
filters.insert( "myfilter1", new MyFilter1() );
filters.insert( "myfilter2", new MyFilter2() );
return filters;
}
};
Author
Stephen Kelly steve.nosp@m.ire@.nosp@m.gmail.nosp@m..com

Definition at line 78 of file taglibraryinterface.h.

Member Function Documentation

virtual QHash<QString, Filter *> Grantlee::TagLibraryInterface::filters ( const QString name = QString())
inlinevirtual

Returns the Filter implementations available in this library.

Definition at line 97 of file taglibraryinterface.h.

virtual QHash<QString, AbstractNodeFactory *> Grantlee::TagLibraryInterface::nodeFactories ( const QString name = QString())
inlinevirtual

Returns the AbstractNodeFactory implementations available in this library.

Definition at line 87 of file taglibraryinterface.h.