OPimAccessTemplate< T > Class Template Reference
Thats the frontend to our OPIE PIM Library. More...
#include <opimaccesstemplate.h>
Inheritance diagram for OPimAccessTemplate< T >:


Public Types | |
| typedef ORecordList< T > | List |
| typedef OPimAccessBackend< T > | BackEnd |
| typedef OPimCache< T > | Cache |
| enum | Access { Random = 0, SortedAccess } |
Public Member Functions | |
| OPimAccessTemplate (BackEnd *end) | |
| c'tor BackEnd enum Access a small hint on how to handle the backend | |
| virtual | ~OPimAccessTemplate () |
| bool | load () |
| load from the backend | |
| virtual bool | reload () |
| Reload database. | |
| bool | save () |
| Save contacts database. | |
| bool | wasChangedExternally () const |
| if the resource was changed externally You should use the signal handling instead of polling possible changes ! zecke: Do you implement a signal for otodoaccess ? | |
| virtual List | allRecords () const |
| return a List of records you can iterate over them | |
| virtual List | matchRegexp (const QRegExp &r) const |
| return a List of records that match the regex | |
| virtual List | queryByExample (const T &t, int querySettings, const QDateTime &d=QDateTime()) |
| queryByExample. | |
| virtual T | find (int uid) const |
| find the OPimRecord uid | |
| virtual T | find (int uid, const QArray< int > &, uint current, typename OTemplateBase< T >::CacheDirection dir=OTemplateBase< T >::Forward) const |
| read ahead cache find method ;) | |
| void | clear () |
| clears the backend and invalidates the backend | |
| virtual bool | add (const T &t) |
| add T to the backend | |
| bool | add (const OPimRecord &) |
| virtual bool | remove (const T &t) |
| remove T from the backend | |
| bool | remove (int uid) |
| remove the OPimRecord with uid | |
| bool | remove (const OPimRecord &) |
| virtual bool | replace (const T &t) |
| replace T from backend | |
| void | setReadAhead (uint count) |
| void | cache (const T &) const |
| void | setSaneCacheSize (int) |
| QArray< int > | records () const |
Protected Member Functions | |
| void | invalidateCache () |
| invalidate the cache | |
| void | setBackEnd (BackEnd *end) |
| BackEnd * | backEnd () |
| returns the backend | |
Protected Attributes | |
| BackEnd * | m_backEnd |
| Cache | m_cache |
Detailed Description
template<class T = OPimRecord>
class OPimAccessTemplate< T >
Thats the frontend to our OPIE PIM Library.
Either you want to use it's interface or you want to implement your own Access lib Just create a OPimRecord and inherit from the plugins
Definition at line 24 of file opimaccesstemplate.h.
Member Typedef Documentation
|
|||||
|
Definition at line 30 of file opimaccesstemplate.h. Referenced by OPimAccessTemplate< T >::allRecords(), OPimAccessTemplate< T >::matchRegexp(), and OPimAccessTemplate< T >::queryByExample(). |
|
|||||
|
Definition at line 31 of file opimaccesstemplate.h. Referenced by OPimAccessTemplate< T >::backEnd(), OPimAccessTemplate< T >::OPimAccessTemplate(), and OPimAccessTemplate< T >::setBackEnd(). |
|
|||||
|
Definition at line 32 of file opimaccesstemplate.h. |
Member Enumeration Documentation
|
|||||
|
Definition at line 26 of file opimaccesstemplate.h. |
Constructor & Destructor Documentation
|
||||||||||
|
c'tor BackEnd enum Access a small hint on how to handle the backend
Definition at line 162 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::BackEnd. |
|
|||||||||
|
Definition at line 169 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_backEnd. |
Member Function Documentation
|
|||||||||
|
load from the backend
Implements OPimBase. Definition at line 174 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::invalidateCache(), OPimAccessBackend< T >::load(), and OPimAccessTemplate< T >::m_backEnd. |
|
|||||||||
|
Reload database. You should execute this function if the external database was changed. This function will load the external database and afterwards rejoin the local changes. Therefore the local database will be set consistent. Definition at line 179 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::invalidateCache(), OPimAccessTemplate< T >::m_backEnd, and OPimAccessBackend< T >::reload(). |
|
|||||||||
|
Save contacts database. Save is more a "commit". After calling this function, all changes are public available.
Implements OPimBase. Reimplemented in OContactAccess. Definition at line 184 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_backEnd, and OPimAccessBackend< T >::save(). Referenced by OContactAccess::save(). |
|
|||||||||
|
if the resource was changed externally You should use the signal handling instead of polling possible changes ! zecke: Do you implement a signal for otodoaccess ?
Reimplemented in OContactAccess. Definition at line 280 of file opimaccesstemplate.h. Referenced by OContactAccess::save(). |
|
|||||||||
|
return a List of records you can iterate over them
Definition at line 188 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::List. |
|
||||||||||
|
return a List of records that match the regex
Definition at line 194 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::List. |
|
||||||||||||||||||||
|
queryByExample.
Definition at line 205 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::List, OPimAccessTemplate< T >::m_backEnd, and OPimAccessBackend< T >::queryByExample(). |
|
||||||||||
|
find the OPimRecord uid
Implements OTemplateBase< T >. Definition at line 212 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::cache(), OPimAccessBackend< T >::find(), and OPimAccessTemplate< T >::m_backEnd. |
|
||||||||||||||||||||||||
|
read ahead cache find method ;)
Definition at line 218 of file opimaccesstemplate.h. |
|
|||||||||
|
clears the backend and invalidates the backend
Implements OPimBase. Definition at line 235 of file opimaccesstemplate.h. References OPimAccessBackend< T >::clear(), OPimAccessTemplate< T >::invalidateCache(), and OPimAccessTemplate< T >::m_backEnd. |
|
||||||||||
|
add T to the backend
Definition at line 240 of file opimaccesstemplate.h. References OPimAccessBackend< T >::add(), OPimAccessTemplate< T >::cache(), and OPimAccessTemplate< T >::m_backEnd. Referenced by OPimAccessTemplate< T >::add(). |
|
||||||||||
|
Implements OPimBase. Definition at line 245 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::add(), and OPimRecord::rtti(). |
|
||||||||||
|
remove T from the backend
Definition at line 254 of file opimaccesstemplate.h. Referenced by OPimAccessTemplate< T >::remove(). |
|
||||||||||
|
remove the OPimRecord with uid
Implements OPimBase. Definition at line 258 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_backEnd, OPimAccessTemplate< T >::m_cache, OPimAccessBackend< T >::remove(), and OPimCache< T >::remove(). |
|
||||||||||
|
Implements OPimBase. Definition at line 263 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::remove(), and Qtopia::Record::uid(). |
|
||||||||||
|
replace T from backend
Definition at line 267 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_backEnd, OPimAccessTemplate< T >::m_cache, OPimAccessBackend< T >::replace(), and OPimCache< T >::replace(). |
|
||||||||||
|
Definition at line 299 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_backEnd, and OPimAccessBackend< T >::setReadAhead(). |
|
||||||||||
|
Implements OTemplateBase< T >. Definition at line 290 of file opimaccesstemplate.h. Referenced by OPimAccessTemplate< T >::add(), and OPimAccessTemplate< T >::find(). |
|
||||||||||
|
Implements OTemplateBase< T >. Definition at line 295 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::m_cache, and OPimCache< T >::setSize(). |
|
|||||||||
|
Implements OPimBase. Definition at line 200 of file opimaccesstemplate.h. |
|
|||||||||
|
invalidate the cache
Definition at line 272 of file opimaccesstemplate.h. References OPimCache< T >::invalidate(), and OPimAccessTemplate< T >::m_cache. Referenced by OPimAccessTemplate< T >::clear(), OPimAccessTemplate< T >::load(), and OPimAccessTemplate< T >::reload(). |
|
||||||||||
|
Definition at line 284 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::BackEnd, OPimAccessTemplate< T >::m_backEnd, and OPimAccessBackend< T >::setFrontend(). Referenced by OContactAccess::OContactAccess(). |
|
|||||||||
|
returns the backend
Definition at line 276 of file opimaccesstemplate.h. References OPimAccessTemplate< T >::BackEnd, and OPimAccessTemplate< T >::m_backEnd. |
Member Data Documentation
|
|||||
|
|||||
|
Definition at line 154 of file opimaccesstemplate.h. Referenced by OPimAccessTemplate< T >::invalidateCache(), OPimAccessTemplate< T >::remove(), OPimAccessTemplate< T >::replace(), and OPimAccessTemplate< T >::setSaneCacheSize(). |
The documentation for this class was generated from the following file:
