Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::OBackendFactory< T > Class Template Reference

#include </home/clem/local/src/opie/libopie2/opiepim/backend/obackendfactory.h>

List of all members.

Public Member Functions

 OBackendFactory ()

Static Public Member Functions

static T * create (OPimGlobal::PimType type, OPimGlobal::DatabaseStyle database, const QString &appName, const QString &filename=QString::null)
static OPimGlobal::DatabaseStyle defaultDB (OPimGlobal::PimType type)
static T * defaultBackend (OPimGlobal::PimType type, const QString &appName)

Private Attributes

OBackendPrivate * d


Detailed Description

template<class T>
class Opie::OBackendFactory< T >

This class is our factory. It will give us the default implementations of at least Todolist, Contacts and Datebook. In the future this class will allow users to switch the backend with ( XML->SQLite ) without the need to recompile.# This class - as the whole PIM Api - is making use of templates

   OPimTodoAccessBackend* backend = OBackEndFactory<OPimTodoAccessBackend>::Default( OPimGlobal::TODOLIST, QString::null );
   backend->load();
 

Author:
Stefan Eilers
Version:
0.1

Definition at line 84 of file obackendfactory.h.


Constructor & Destructor Documentation

template<class T>
Opie::OBackendFactory< T >::OBackendFactory  )  [inline]
 

Definition at line 87 of file obackendfactory.h.


Member Function Documentation

template<class T>
static T* Opie::OBackendFactory< T >::create OPimGlobal::PimType  type,
OPimGlobal::DatabaseStyle  database,
const QString appName,
const QString filename = QString::null
[inline, static]
 

Returns a selected backend implementation

Parameters:
type the type of the backend
database the type of the used database
appName The name of your application. It will be passed on to the backend.
filename Filename of the database file if you don't want to access the default
See also:
OPimGlobal()

Definition at line 97 of file obackendfactory.h.

References DEFAULT, Opie::OBackendFactory< T >::defaultDB(), NULL, oendl, and owarn.

Referenced by Opie::OBackendFactory< T >::defaultBackend().

template<class T>
static T* Opie::OBackendFactory< T >::defaultBackend OPimGlobal::PimType  type,
const QString appName
[inline, static]
 

Returns the default backend implementation for backendName. Which one is used, is defined by the configfile "pimaccess.conf".

Parameters:
type The type of the backend (
See also:
OPimGlobal())
Parameters:
appName The name of your application. It will be passed on to the backend
See also:
OPimGlobal()

Definition at line 222 of file obackendfactory.h.

References Opie::OBackendFactory< T >::create(), and DEFAULT.

template<class T>
static OPimGlobal::DatabaseStyle Opie::OBackendFactory< T >::defaultDB OPimGlobal::PimType  type  )  [inline, static]
 

Returns the style of the default database which is used to contact PIM data.

Parameters:
type the type of the backend
See also:
OPimGlobal()

Definition at line 179 of file obackendfactory.h.

References QAsciiDict< type >::insert(), Config::readEntry(), QPtrCollection::setAutoDelete(), Config::setGroup(), and TRUE.

Referenced by Opie::OBackendFactory< T >::create().


Member Data Documentation

template<class T>
OBackendPrivate* Opie::OBackendFactory< T >::d [private]
 

Definition at line 226 of file obackendfactory.h.


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 17:59:13 2005 for OPIE by  doxygen 1.4.2