OPimAccessBackend< T > Class Template Reference
OPimAccessBackend is the base class for all private backends it operates on OPimRecord as the base class and it's responsible for fast manipulating the resource the implementation takes care of. More...
#include <opimaccessbackend.h>
Inheritance diagram for OPimAccessBackend< T >:


Public Types | |
| typedef OTemplateBase< T > | Frontend |
Public Member Functions | |
| OPimAccessBackend (int access=0) | |
| The access hint from the frontend. | |
| virtual | ~OPimAccessBackend () |
| virtual bool | load ()=0 |
| load the resource | |
| virtual bool | reload ()=0 |
| reload the resource | |
| virtual bool | save ()=0 |
| save the resource and all it's changes | |
| virtual QArray< int > | allRecords () const=0 |
| return an array of all available uids | |
| virtual QArray< int > | matchRegexp (const QRegExp &r) const=0 |
| return a List of records that match the regex | |
| virtual QArray< int > | queryByExample (const T &t, int settings, const QDateTime &d=QDateTime())=0 |
| queryByExample for T with the given Settings | |
| virtual T | find (int uid) const=0 |
| find the OPimRecord with uid | |
| virtual T | find (int uid, const QArray< int > &items, uint current, typename Frontend::CacheDirection) const |
| virtual void | clear ()=0 |
| clear the back end | |
| virtual bool | add (const T &t)=0 |
| add T | |
| virtual bool | remove (int uid)=0 |
| remove | |
| virtual bool | replace (const T &t)=0 |
| replace a record with T.uid() | |
| void | setFrontend (Frontend *front) |
| void | setReadAhead (uint count) |
| set the read ahead count | |
Protected Member Functions | |
| int | access () const |
| void | cache (const T &t) const |
| void | setSaneCacheSize (int) |
| use a prime number here! | |
| uint | readAhead () const |
Detailed Description
template<class T = OPimRecord>
class OPimAccessBackend< T >
OPimAccessBackend is the base class for all private backends it operates on OPimRecord as the base class and it's responsible for fast manipulating the resource the implementation takes care of.
Definition at line 21 of file opimaccessbackend.h.
Member Typedef Documentation
|
|||||
|
Definition at line 23 of file opimaccessbackend.h. Referenced by OPimAccessBackend< T >::setFrontend(). |
Constructor & Destructor Documentation
|
||||||||||
|
The access hint from the frontend.
Definition at line 120 of file opimaccessbackend.h. |
|
|||||||||
|
Definition at line 126 of file opimaccessbackend.h. |
Member Function Documentation
|
|||||||||
|
load the resource
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::load(). |
|
|||||||||
|
reload the resource
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::reload(). |
|
|||||||||
|
save the resource and all it's changes
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::save(). |
|
|||||||||
|
return an array of all available uids
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. |
|
||||||||||
|
return a List of records that match the regex
Implemented in OContactAccessBackend, OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. |
|
||||||||||||||||||||
|
queryByExample for T with the given Settings
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::queryByExample(). |
|
||||||||||
|
find the OPimRecord with uid
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::find(). |
|
||||||||||||||||||||||||
|
Reimplemented in OTodoAccessBackendSQL. Definition at line 144 of file opimaccessbackend.h. |
|
|||||||||
|
clear the back end
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::clear(). |
|
||||||||||
|
add T
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::add(). |
|
||||||||||
|
remove
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::remove(). |
|
||||||||||
|
replace a record with T.uid()
Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, OContactAccessBackend_XML, ODateBookAccessBackend_SQL, ODateBookAccessBackend_XML, OTodoAccessBackendSQL, OTodoAccessVCal, and OTodoAccessXML. Referenced by OPimAccessTemplate< T >::replace(). |
|
||||||||||
|
Definition at line 130 of file opimaccessbackend.h. References OPimAccessBackend< T >::Frontend. Referenced by OPimAccessTemplate< T >::setBackEnd(). |
|
||||||||||
|
set the read ahead count
Definition at line 149 of file opimaccessbackend.h. Referenced by OPimAccessTemplate< T >::setReadAhead(). |
|
|||||||||
|
Definition at line 157 of file opimaccessbackend.h. |
|
||||||||||
|
Definition at line 134 of file opimaccessbackend.h. |
|
||||||||||
|
use a prime number here!
Definition at line 139 of file opimaccessbackend.h. References OTemplateBase< T >::setSaneCacheSize(). |
|
|||||||||
|
Definition at line 153 of file opimaccessbackend.h. |
The documentation for this class was generated from the following file:
