author | zecke <zecke> | 2002-09-22 22:21:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-22 22:21:51 (UTC) |
commit | e49230a12104b718c46a34c81b6c0e608c9d40be (patch) (side-by-side diff) | |
tree | 4ef2e58c366a8cf7c4abe04838e255b38613fbcb /libopie/pim/opimaccesstemplate.h | |
parent | 3049d9418b882283814ca71baa98420b2a6745db (diff) | |
download | opie-e49230a12104b718c46a34c81b6c0e608c9d40be.zip opie-e49230a12104b718c46a34c81b6c0e608c9d40be.tar.gz opie-e49230a12104b718c46a34c81b6c0e608c9d40be.tar.bz2 |
Add XML resources for todolist and compile fixes for RecordList
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/opimaccesstemplate.h | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h index 36f5a99..31ab516 100644 --- a/libopie/pim/opimaccesstemplate.h +++ b/libopie/pim/opimaccesstemplate.h @@ -15,5 +15,5 @@ * interface or you want to implement * your own Access lib - * Just create a OPimRecord and inherit from + * Just create a OPimRecord and inherit from * the plugins */ @@ -37,19 +37,19 @@ public: OPimAccessTemplate( BackEnd* end); virtual ~OPimAccessTemplate(); - + /** * load from the backend */ - virtual void load(); - + virtual bool load(); + /** * reload from the backend */ - virtual void reload(); - + virtual bool reload(); + /** - * save to the backend + * save to the backend */ - virtual void save(); + virtual bool save(); /** @@ -57,5 +57,5 @@ public: */ bool wasChangedExternally()const; - + /** * return a List of records @@ -63,14 +63,14 @@ public: */ virtual List allRecords()const; - + /** - * queryByExample + * queryByExample */ virtual List queryByExample( const T& t, int sortOrder ); - + /** * find the OPimRecord uid */ - virtual T find( int uid ); + virtual T find( int uid )const; /* invalidate cache here */ @@ -79,5 +79,5 @@ public: */ virtual void clear() ; - + /** * add T to the backend @@ -90,10 +90,10 @@ public: */ virtual bool remove( const T& t ); - + /** * remove the OPimRecord with uid */ virtual bool remove( int uid ); - + /** * replace T from backend @@ -105,5 +105,6 @@ protected: */ void invalidateCache(); - + + void setBackEnd( BackEnd* end ); /** * returns the backend @@ -126,14 +127,14 @@ OPimAccessTemplate<T>::~OPimAccessTemplate() { } template <class T> -void OPimAccessTemplate<T>::load() { - m_backEnd->load(); +bool OPimAccessTemplate<T>::load() { + return m_backEnd->load(); } template <class T> -void OPimAccessTemplate<T>::reload() { - m_backEnd->reload(); +bool OPimAccessTemplate<T>::reload() { + return m_backEnd->reload(); } template <class T> -void OPimAccessTemplate<T>::save() { - m_backEnd->save(); +bool OPimAccessTemplate<T>::save() { + return m_backEnd->save(); } template <class T> @@ -152,5 +153,5 @@ OPimAccessTemplate<T>::queryByExample( const T& t, int sortOrder ) { } template <class T> -T OPimAccessTemplate<T>::find( int uid ) { +T OPimAccessTemplate<T>::find( int uid ) const{ T t = m_backEnd->find( uid ); return t; @@ -189,3 +190,7 @@ bool OPimAccessTemplate<T>::wasChangedExternally()const { return false; } +template <class T> +void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) { + m_backEnd = end; +} #endif |