From: Szasz P. <sp...@us...> - 2004-03-17 20:25:54
|
Update of /cvsroot/rtk/rtk/rtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31619/rtk Modified Files: DList.h Dict.h Export.h TVector.h Variant.h Log Message: Some changes so they will work in symbian (or just to remove some annoying warning messages from the compiler) Index: Export.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Export.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Export.h 10 Mar 2004 11:41:37 -0000 1.4 --- Export.h 17 Mar 2004 20:16:11 -0000 1.5 *************** *** 25,29 **** # define RTK_API IMPORT_C # else ! # define RTK_API EXPORT_C # endif #else --- 25,30 ---- # define RTK_API IMPORT_C # else ! //# define RTK_API EXPORT_C ! # define RTK_API # endif #else Index: Dict.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Dict.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Dict.h 9 Mar 2004 17:01:27 -0000 1.7 --- Dict.h 17 Mar 2004 20:16:11 -0000 1.8 *************** *** 187,197 **** DictNode ** _table; - FreeDataFunc _free_func; - HashFunc _hash_func; - KeyCopyFunc _keycopy_func; KeyFreeFunc _keyfree_func; KeyCmpFunc _keycmp_func; }; // Dict class --- 187,196 ---- DictNode ** _table; KeyCopyFunc _keycopy_func; KeyFreeFunc _keyfree_func; KeyCmpFunc _keycmp_func; + HashFunc _hash_func; + FreeDataFunc _free_func; }; // Dict class Index: Variant.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/Variant.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Variant.h 14 Feb 2004 20:02:12 -0000 1.2 --- Variant.h 17 Mar 2004 20:16:11 -0000 1.3 *************** *** 42,46 **** #include "String.h" - #include "Export.h" namespace Rtk { --- 42,45 ---- Index: TVector.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/TVector.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TVector.h 9 Mar 2004 17:01:27 -0000 1.4 --- TVector.h 17 Mar 2004 20:16:11 -0000 1.5 *************** *** 55,92 **** TVector(int def_size = 4) : Vector(def_size) {} ! int Add(T obj) { return Vector::Add((void*)obj); } ! bool Add(T obj, int idx) { return Vector::Add((void*)obj, idx); } ! int Find(const T obj, int* idx = (int*)0) const { return Vector::Find((void*)obj, idx); } template <class T2> ! int Find(bool (*fn)(const T obj, T2 obj2), T2 param, int* idx = (int*)0) { ! return Vector::Find((bool(*)(const void*,void*))fn, (void*)param, idx); } ! template <class T2> ! class TSearchIterator : public SearchIterator ! { ! public: ! TSearchIterator(TVector<T>& v, bool (*fn)(const T obj, T2 obj2), T2 param) ! :SearchIterator(v,(bool(*)(const void*,void*))fn, param) ! {} ! ! T Next() { return (T) SearchIterator::Next(); } ! }; ! ! template <class T2> ! TSearchIterator<T2>* Search(bool (*fn)(const T obj, T2 obj2), T2 param) { ! return new TSearchIterator<T2>(*this, fn, param); ! } ! T Get(int idx) { return (T)Vector::Get(idx); } ! const T Get(int idx) const { return (T)Vector::Get(idx); } ! T& At(int idx) { return (T&)Vector::At(idx); } ! RTK_INLINE T& operator[](int idx) { return (T&)Vector::At(idx); } ! RTK_INLINE void Push(T obj) { Vector::Push((void*)obj); } ! RTK_INLINE T Pop() { return (T)Vector::Pop(); } ! RTK_INLINE T Top() { return (T)Vector::Top(); } ! RTK_INLINE void Queue(T obj) { Vector::Queue((void*)obj); } ! T Dequeue() { return (T)Vector::Dequeue(); } }; --- 55,77 ---- TVector(int def_size = 4) : Vector(def_size) {} ! int Add(const T& obj) { return Vector::Add((void*)&obj); } ! bool Add(const T& obj, int idx) { return Vector::Add((void*)&obj, idx); } ! int Find(const T &obj, int* idx = (int*)0) const { return Vector::Find((void*)&obj, idx); } template <class T2> ! int Find(bool (*fn)(const T& obj, T2& obj2), T2& param, int* idx = (int*)0) { ! return Vector::Find((bool(*)(const void*,void*))fn, (void*)¶m, idx); } ! T& Get(int idx) { return *(T*)Vector::Get(idx); } ! const T& Get(int idx) const { return *(T*)Vector::Get(idx); } ! T& At(int idx) { return *(T*)Vector::At(idx); } ! RTK_INLINE T& operator[](int idx) { return *(T*)Vector::At(idx); } ! RTK_INLINE void Push(const T& obj) { Vector::Push((void*)&obj); } ! RTK_INLINE T& Pop() { return *(T*)Vector::Pop(); } ! RTK_INLINE T& Top() { return *(T*)Vector::Top(); } ! RTK_INLINE void Queue(const T& obj) { Vector::Queue((void*)&obj); } ! T Dequeue() { return *(T*)Vector::Dequeue(); } }; *************** *** 95,99 **** { protected: ! void _Delete(int idx) { delete (T)(_data[idx]); } public: TVectorP(int def_size = 4) : TVector<T>(def_size) { _dealloc = true; } --- 80,84 ---- { protected: ! void _Delete(int idx) { delete *(T*)(_data[idx]); } public: TVectorP(int def_size = 4) : TVector<T>(def_size) { _dealloc = true; } Index: DList.h =================================================================== RCS file: /cvsroot/rtk/rtk/rtk/DList.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DList.h 9 Mar 2004 17:01:27 -0000 1.3 --- DList.h 17 Mar 2004 20:16:11 -0000 1.4 *************** *** 75,79 **** /** In subclassess this method can perform aditional memory deallocation */ ! virtual void _Delete(Node* node) { // NOP } --- 75,84 ---- /** In subclassess this method can perform aditional memory deallocation */ ! #ifndef __EPOC32__ ! // some temporary workaround. With virtual it creates an internal ! // compiler error when compiling for symbian ! virtual ! #endif ! void _Delete(Node* node) { // NOP } |