summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-31 15:10:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-31 16:39:32 +0100
commite0be9e6691269d305ceedc7f1d4955a7976e3dc6 (patch)
treee22251779c764642131a06b97b7aef56ce6c8c39
parentRemove unused header files (diff)
downloadbinfilter-e0be9e6691269d305ceedc7f1d4955a7976e3dc6.tar.gz
binfilter-e0be9e6691269d305ceedc7f1d4955a7976e3dc6.zip
move DECLARE_LIST into binfilter
Change-Id: I524579858012f1a62e1caf45726abc0d39985f4b
-rw-r--r--binfilter/inc/bf_svtools/svdde.hxx61
1 files changed, 61 insertions, 0 deletions
diff --git a/binfilter/inc/bf_svtools/svdde.hxx b/binfilter/inc/bf_svtools/svdde.hxx
index dbac5635a..9b9fe52d5 100644
--- a/binfilter/inc/bf_svtools/svdde.hxx
+++ b/binfilter/inc/bf_svtools/svdde.hxx
@@ -29,6 +29,67 @@
#include <tools/list.hxx>
#include <tools/link.hxx>
+// ----------------
+// - DECLARE_LIST -
+// ----------------
+
+#define DECLARE_LIST( ClassName, Type ) \
+class ClassName : private List \
+{ \
+public: \
+ using List::Clear; \
+ using List::Count; \
+ using List::GetCurPos; \
+ \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
+ List( _nInitSize, _nReSize ) {} \
+ ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize,\
+ sal_uInt16 _nReSize ) : \
+ List( _nBlockSize, _nInitSize, _nReSize ) {} \
+ ClassName( const ClassName& rClassName ) : \
+ List( rClassName ) {} \
+ \
+ void Insert( Type p, sal_uIntPtr nIndex ) \
+ { List::Insert( (void*)p, nIndex ); } \
+ void Insert( Type p ) \
+ { List::Insert( (void*)p ); } \
+ Type Remove() \
+ { return (Type)List::Remove(); } \
+ Type Remove( sal_uIntPtr nIndex ) \
+ { return (Type)List::Remove( nIndex ); } \
+ Type Remove( Type p ) \
+ { return (Type)List::Remove( (void*)p ); } \
+ Type Replace( Type p, sal_uIntPtr nIndex ) \
+ { return (Type)List::Replace( (void*)p, nIndex ); } \
+ Type Replace( Type pNew, Type pOld ) \
+ { return (Type)List::Replace( (void*)pNew, \
+ (void*)pOld ); } \
+ \
+ Type GetCurObject() const \
+ { return (Type)List::GetCurObject(); } \
+ Type GetObject( sal_uIntPtr nIndex ) const \
+ { return (Type)List::GetObject( nIndex ); } \
+ sal_uIntPtr GetPos( const Type p ) const \
+ { return List::GetPos( (const void*)p ); } \
+ \
+ Type Seek( sal_uIntPtr nIndex ) \
+ { return (Type)List::Seek( nIndex ); } \
+ Type Seek( void* p ) { return (Type)List::Seek( p ); } \
+ Type First() { return (Type)List::First(); } \
+ Type Last() { return (Type)List::Last(); } \
+ Type Next() { return (Type)List::Next(); } \
+ Type Prev() { return (Type)List::Prev(); } \
+ \
+ ClassName& operator =( const ClassName& rClassName ) \
+ { List::operator =( rClassName ); return *this; } \
+ \
+ sal_Bool operator ==( const ClassName& rList ) const \
+ { return List::operator ==( rList ); } \
+ sal_Bool operator !=( const ClassName& rList ) const \
+ { return List::operator !=( rList ); } \
+};
+
namespace binfilter
{