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

Opie::OPimAccessFactory< T > Class Template Reference

#include </home/clem/local/src/opie/libopie2/opiepim/core/opimaccessfactory.h>

List of all members.

Public Member Functions

 OPimAccessFactory ()

Static Public Member Functions

static T * create (OPimGlobal::PimType type, OPimGlobal::DatabaseStyle dbStyle, const QString &appName, const QString &fileName=QString::null)
static T * defaultAccess (typename OPimGlobal::PimType type, const QString &appName)


Detailed Description

template<class T>
class Opie::OPimAccessFactory< T >

This class is our factory for creating PIM access objects. You should use these objects to load, store and search information in our PIM databases. Currently we support objects for accessing the datebook, the contact- and the todolist.
See also:
OPimGlobal for more information of used values.
This class - as the whole PIM Api - is making use of templates

Example for getting an access object for the XML database of todolist:

   OPimTodoAccess* access = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::XML, "example" );
 

Author:
Stefan Eilers
Version:
0.1

Definition at line 62 of file opimaccessfactory.h.


Constructor & Destructor Documentation

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

Definition at line 65 of file opimaccessfactory.h.


Member Function Documentation

template<class T>
static T* Opie::OPimAccessFactory< T >::create OPimGlobal::PimType  type,
OPimGlobal::DatabaseStyle  dbStyle,
const QString appName,
const QString fileName = QString::null
[inline, static]
 

Returns the selected PIM access-object.

Parameters:
type Type of the selected database (addressbook, todolist or datebook)
dbStyle Which database style should be used (xml, sql, vcard)
appName "Name" of your application. This should be any constant string which is used by some backends for creating special files (i.e.journal files). Please keep the string unique for your application !
fileName Filename of database if something different as the default should be used.
See also:
OPimGlobal()

Definition at line 77 of file opimaccessfactory.h.

References l, and QString::null.

Referenced by Opie::OPimAccessFactory< T >::defaultAccess().

template<class T>
static T* Opie::OPimAccessFactory< T >::defaultAccess typename OPimGlobal::PimType  type,
const QString appName
[inline, static]
 

Returns the selected PIM access-object, using the default database style Which style is selected is defined in the configfile "pimaccess.conf" in the directory "Settings"

Parameters:
type Type of the selected database (addressbook, todolist or datebook)
appName "Name" of your application. This should be any constant string which is used by some backends for creating special files (i.e.journal files). Please keep the string unique for your application !
See also:
OPimGlobal()

Definition at line 112 of file opimaccessfactory.h.

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


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