Changeset 4129 for trunk/tools/common/kList.h
- Timestamp:
- Aug 31, 2000, 5:00:13 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/common/kList.h
r3237 r4129 1 /* $Id: kList.h,v 1. 2 2000-03-25 23:17:47bird Exp $ */1 /* $Id: kList.h,v 1.3 2000-08-31 03:00:13 bird Exp $ */ 2 2 /* 3 3 * Simple list and sorted list template class. 4 * Note: simple list is not implemented yet, as it is not yet needed.5 4 * 6 5 * Copyright (c) 1999 knut st. osmundsen … … 9 8 #ifndef _lkList_h_ 10 9 #define _lkList_h_ 10 11 11 12 12 /** … … 40 40 return pNext; 41 41 } 42 }; 42 43 43 #if 0 44 /* !MUST IMPLEMENT! */ 45 BOOL operator==(const k... &entry) const; 46 BOOL operator!=(const k... &entry) const; 47 BOOL operator< (const k... &entry) const; 48 BOOL operator<=(const k... &entry) const; 49 BOOL operator> (const k... &entry) const; 50 BOOL operator>=(const k... &entry) const; 44 45 46 /** 47 * List template. Not Implemented yet. 48 * @author knut st. osmundsen 49 */ 50 template <class kEntry> 51 class kList 52 { 53 private: 54 kEntry *pFirst; 55 kEntry *pLast; 56 unsigned long cEntries; 57 58 public: 59 kList(void); 60 ~kList(void); 61 62 void destroy(void); 63 void insert(kEntry *pEntry); 64 kEntry * getFirst(void) const; 65 kEntry * getLast(void) const; 66 unsigned long getCount(void) const; 67 }; 68 69 70 /** 71 * List entry parent function. 72 * @purpose Serve as a base class for list sorted entries. 73 * @author knut st. osmundsen 74 */ 75 class kSortedListEntry : public kListEntry 76 { 77 public: 78 #if 0 //MUST BE IMPLEMENTED! 79 virtual BOOL operator==(const k..Entry &entry) const = 0; 80 virtual BOOL operator!=(const k..Entry &entry) const = 0; 81 virtual BOOL operator< (const k..Entry &entry) const = 0; 82 virtual BOOL operator<=(const k..Entry &entry) const = 0; 83 virtual BOOL operator> (const k..Entry &entry) const = 0; 84 virtual BOOL operator>=(const k..Entry &entry) const = 0; 51 85 #endif 52 86 }; … … 78 112 79 113 80 /**81 * List template. Not Implemented yet.82 * @author knut st. osmundsen83 */84 template <class kEntry>85 class kList86 {87 private:88 kEntry *pFirst;89 kEntry *pLast;90 unsigned long cEntries;91 92 public:93 kList(void);94 ~kList(void);95 96 void destroy(void);97 void insert(kEntry *pEntry);98 kEntry * getFirst(void) const;99 kEntry * getLast(void) const;100 unsigned long getCount(void) const;101 };102 103 114 #endif 104 115
Note:
See TracChangeset
for help on using the changeset viewer.