From 9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 30 Nov 2002 11:28:47 +0000 Subject: More infrastructure ORecur has now the nextOccurence function exceptions We've now Notifers like Alarms and DatebookEntries we may add to execute applications... AppName replaced with service cause it is a service Add rtti to OPimRecord as a static function This is used inside the BackEnd classes to static_cast... added removeAllCompleted to the todobackends... add a common Opie PIM mainwindow which takes care of some simple scripting enchangements.. much more --- (limited to 'libopie2/opiepim/core/opimaccesstemplate.h') diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 6de68b1..8cf81c8 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h @@ -93,6 +93,7 @@ public: * @return true if added successfully. */ virtual bool add( const T& t ) ; + bool add( const OPimRecord& ); /* only the uid matters */ /** @@ -212,6 +213,15 @@ bool OPimAccessTemplate::add( const T& t ) { return m_backEnd->add( t ); } template +bool OPimAccessTemplate::add( const OPimRecord& rec) { + /* same type */ + if ( rec.rtti() == T::rtti() ) { + const T &t = static_cast(rec); + return add(t); + } + return false; +} +template bool OPimAccessTemplate::remove( const T& t ) { return remove( t.uid() ); } -- cgit v0.9.0.2