Diffstat (limited to 'libopie2/opiepim/core/opimaccesstemplate.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 36f5a99..31ab516 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h @@ -42,3 +42,3 @@ public: */ - virtual void load(); + virtual bool load(); @@ -47,3 +47,3 @@ public: */ - virtual void reload(); + virtual bool reload(); @@ -52,3 +52,3 @@ public: */ - virtual void save(); + virtual bool save(); @@ -73,3 +73,3 @@ public: */ - virtual T find( int uid ); + virtual T find( int uid )const; @@ -107,2 +107,3 @@ protected: + void setBackEnd( BackEnd* end ); /** @@ -127,12 +128,12 @@ 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(); } @@ -153,3 +154,3 @@ 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 ); @@ -190,2 +191,6 @@ bool OPimAccessTemplate<T>::wasChangedExternally()const { } +template <class T> +void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) { + m_backEnd = end; +} #endif |