Changeset 36654 in vbox for trunk/include/iprt/cpp
- Timestamp:
- Apr 12, 2011 12:42:35 PM (14 years ago)
- Location:
- trunk/include/iprt/cpp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/list.h
r36573 r36654 120 120 inline void enterWrite() {} 121 121 inline void leaveWrite() {} 122 123 /* Define our own new and delete. */ 124 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 122 125 }; 123 126 … … 193 196 { 194 197 /** 198 * Traits 199 * 195 200 * Defines the return type of most of the getter methods. If the internal 196 201 * used type is a pointer, we return a reference. If not we return by … … 221 226 * 222 227 * The other list will be fully copied and the capacity will be the same as 223 * the size if the other list.228 * the size of the other list. 224 229 * 225 230 * @param other The list to copy. … … 688 693 } 689 694 695 /* Define our own new and delete. */ 696 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 697 690 698 /** 691 699 * The default capacity of the list. This is also used as grow factor. 692 700 */ 693 701 static const size_t DefaultCapacity; 694 private: 702 703 protected: 695 704 696 705 /** … … 779 788 class RTCList : public RTCListBase<T, ITYPE, false> 780 789 { 790 /* Traits */ 781 791 typedef RTCListBase<T, ITYPE, false> BASE; 792 782 793 public: 794 /** 795 * Creates a new list. 796 * 797 * This preallocates @a cCapacity elements within the list. 798 * 799 * @param cCapacitiy The initial capacity the list has. 800 * @throws std::bad_alloc 801 */ 783 802 RTCList(size_t cCapacity = BASE::DefaultCapacity) 784 803 : BASE(cCapacity) {} 804 805 /* Define our own new and delete. */ 806 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 785 807 }; 786 808 … … 794 816 class RTCList<uint64_t>: public RTCListBase<uint64_t, uint64_t, false> 795 817 { 818 /* Traits */ 796 819 typedef RTCListBase<uint64_t, uint64_t, false> BASE; 820 797 821 public: 822 /** 823 * Creates a new list. 824 * 825 * This preallocates @a cCapacity elements within the list. 826 * 827 * @param cCapacitiy The initial capacity the list has. 828 * @throws std::bad_alloc 829 */ 798 830 RTCList(size_t cCapacity = BASE::DefaultCapacity) 799 831 : BASE(cCapacity) {} 832 833 /* Define our own new and delete. */ 834 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 800 835 }; 801 836 … … 809 844 class RTCList<int64_t>: public RTCListBase<int64_t, int64_t, false> 810 845 { 846 /* Traits */ 811 847 typedef RTCListBase<int64_t, int64_t, false> BASE; 848 812 849 public: 850 /** 851 * Creates a new list. 852 * 853 * This preallocates @a cCapacity elements within the list. 854 * 855 * @param cCapacitiy The initial capacity the list has. 856 * @throws std::bad_alloc 857 */ 813 858 RTCList(size_t cCapacity = BASE::DefaultCapacity) 814 859 : BASE(cCapacity) {} 860 861 /* Define our own new and delete. */ 862 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 815 863 }; 816 864 -
trunk/include/iprt/cpp/mtlist.h
r36563 r36654 49 49 inline void leaveWrite() { int rc = RTSemRWReleaseWrite(m_hRWSem); AssertRC(rc); } 50 50 51 /* Define our own new and delete. */ 52 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 53 51 54 private: 52 55 mutable RTSEMRW m_hRWSem; … … 72 75 class RTCMTList : public RTCListBase<T, ITYPE, true> 73 76 { 77 /* Traits */ 74 78 typedef RTCListBase<T, ITYPE, true> BASE; 79 75 80 public: 81 /** 82 * Creates a new list. 83 * 84 * This preallocates @a cCapacity elements within the list. 85 * 86 * @param cCapacitiy The initial capacity the list has. 87 * @throws std::bad_alloc 88 */ 76 89 RTCMTList(size_t cCapacity = BASE::DefaultCapacity) 77 90 : BASE(cCapacity) {} 91 92 /* Define our own new and delete. */ 93 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 78 94 }; 79 95 … … 87 103 class RTCMTList<uint64_t>: public RTCListBase<uint64_t, uint64_t, true> 88 104 { 105 /* Traits */ 89 106 typedef RTCListBase<uint64_t, uint64_t, true> BASE; 107 90 108 public: 109 /** 110 * Creates a new list. 111 * 112 * This preallocates @a cCapacity elements within the list. 113 * 114 * @param cCapacitiy The initial capacity the list has. 115 * @throws std::bad_alloc 116 */ 91 117 RTCMTList(size_t cCapacity = BASE::DefaultCapacity) 92 118 : BASE(cCapacity) {} 119 120 /* Define our own new and delete. */ 121 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 93 122 }; 94 123 … … 102 131 class RTCMTList<int64_t>: public RTCListBase<int64_t, int64_t, true> 103 132 { 133 /* Traits */ 104 134 typedef RTCListBase<int64_t, int64_t, true> BASE; 135 105 136 public: 137 /** 138 * Creates a new list. 139 * 140 * This preallocates @a cCapacity elements within the list. 141 * 142 * @param cCapacitiy The initial capacity the list has. 143 * @throws std::bad_alloc 144 */ 106 145 RTCMTList(size_t cCapacity = BASE::DefaultCapacity) 107 146 : BASE(cCapacity) {} 147 148 /* Define our own new and delete. */ 149 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 108 150 }; 109 151
Note:
See TracChangeset
for help on using the changeset viewer.