Lines Matching refs:pVec
108 DECLINLINE(size_t) name ## Size(struct name *pVec) \
110 return(pVec->mcElements); \
117 DECLINLINE(int) name ## Reserve(struct name *pVec, size_t cNewCapacity) \
121 if (cNewCapacity <= pVec->mcCapacity) \
123 pvNew = pfnRealloc(pVec->mpElements, cNewCapacity * sizeof(type)); \
126 pVec->mcCapacity = cNewCapacity; \
127 pVec->mpElements = (type *)pvNew; \
135 DECLINLINE(type *) name ## Begin(struct name *pVec) \
137 return(pVec->mpElements); \
145 DECLINLINE(type *) name ## End(struct name *pVec) \
147 return(&pVec->mpElements[pVec->mcElements]); \
158 DECLINLINE(type *) name ## PushBack(struct name *pVec) \
160 Assert(pVec->mcElements <= pVec->mcCapacity); \
161 if ( pVec->mcElements == pVec->mcCapacity \
162 && RT_FAILURE(name ## Reserve(pVec, pVec->mcCapacity \
165 ++pVec->mcElements; \
166 return &pVec->mpElements[pVec->mcElements - 1]; \
173 DECLINLINE(void) name ## PopBack(struct name *pVec) \
175 Assert(pVec->mcElements <= pVec->mcCapacity); \
176 --pVec->mcElements; \
191 DECLINLINE(void) name ## PopBack(struct name *pVec) \
193 Assert(pVec->mcElements <= pVec->mcCapacity); \
194 --pVec->mcElements; \
195 pfnDelete(pfnAdapter(&pVec->mpElements[pVec->mcElements])); \
203 DECLINLINE(void) name ## Clear(struct name *pVec) \
205 Assert(pVec->mcElements <= pVec->mcCapacity); \
206 pVec->mcElements = 0; \
218 DECLINLINE(void) name ## Clear(struct name *pVec) \
222 Assert(pVec->mcElements <= pVec->mcCapacity); \
223 for (i = 0; i < pVec->mcElements; ++i) \
224 pfnDelete(pfnAdapter(&pVec->mpElements[i])); \
225 pVec->mcElements = 0; \
234 DECLINLINE(type *) name ## Detach(struct name *pVec) \
236 type *pArray = pVec->mpElements; \
238 Assert(pVec->mcElements <= pVec->mcCapacity); \
239 pVec->mcElements = 0; \
240 pVec->mpElements = NULL; \
241 pVec->mcCapacity = 0; \