Grantlee  0.5.1
Public Types | Public Member Functions
Grantlee::AbstractTemplateLoader Class Reference

An retrieval interface to a storage location for Template objects. More...

#include <grantlee/templateloader.h>

Inheritance diagram for Grantlee::AbstractTemplateLoader:
Inheritance graph
[legend]

List of all members.

Public Types

typedef QSharedPointer
< AbstractTemplateLoader
Ptr

Public Member Functions

virtual ~AbstractTemplateLoader ()
virtual bool canLoadTemplate (const QString &name) const =0
virtual QPair< QString, QString > getMediaUri (const QString &fileName) const =0
virtual Template loadByName (const QString &name, Engine const *engine) const =0

Detailed Description

This interface can be implemented to define new ways of retrieving the content of Templates.

The interface of this class should not be called directly from applications. TemplateLoaders will typically be created, configured and added to the Grantlee::Engine which will call the appropriate API.

Author:
Stephen Kelly <steveire@gmail.com>

Definition at line 46 of file templateloader.h.


Member Typedef Documentation

A QSharedPointer to an AbstractTemplateLoader

Definition at line 52 of file templateloader.h.


Constructor & Destructor Documentation

Destructor


Member Function Documentation

virtual bool Grantlee::AbstractTemplateLoader::canLoadTemplate ( const QString &  name) const [pure virtual]

Return true if a Template identified by name exists and can be loaded.

Implemented in Grantlee::InMemoryTemplateLoader, Grantlee::FileSystemTemplateLoader, and Grantlee::CachingLoaderDecorator.

virtual QPair<QString, QString> Grantlee::AbstractTemplateLoader::getMediaUri ( const QString &  fileName) const [pure virtual]

Return a complete URI for media identified by fileName.

Implemented in Grantlee::InMemoryTemplateLoader, Grantlee::FileSystemTemplateLoader, and Grantlee::CachingLoaderDecorator.

virtual Template Grantlee::AbstractTemplateLoader::loadByName ( const QString &  name,
Engine const *  engine 
) const [pure virtual]

Load a Template called name. Return an invalid Template if no content by that name exists.

Implemented in Grantlee::InMemoryTemplateLoader, Grantlee::FileSystemTemplateLoader, and Grantlee::CachingLoaderDecorator.