Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

532 lines
21 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. // Inlines for AFXCOLL.H
  11. #ifdef _AFXCOLL_INLINE
  12. ////////////////////////////////////////////////////////////////////////////
  13. _AFXCOLL_INLINE INT_PTR CByteArray::GetSize() const
  14. { return m_nSize; }
  15. _AFXCOLL_INLINE INT_PTR CByteArray::GetUpperBound() const
  16. { return m_nSize-1; }
  17. _AFXCOLL_INLINE void CByteArray::RemoveAll()
  18. { SetSize(0); }
  19. _AFXCOLL_INLINE BYTE CByteArray::GetAt(INT_PTR nIndex) const
  20. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  21. return m_pData[nIndex]; }
  22. _AFXCOLL_INLINE void CByteArray::SetAt(INT_PTR nIndex, BYTE newElement)
  23. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  24. m_pData[nIndex] = newElement; }
  25. _AFXCOLL_INLINE BYTE& CByteArray::ElementAt(INT_PTR nIndex)
  26. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  27. return m_pData[nIndex]; }
  28. _AFXCOLL_INLINE const BYTE* CByteArray::GetData() const
  29. { return (const BYTE*)m_pData; }
  30. _AFXCOLL_INLINE BYTE* CByteArray::GetData()
  31. { return (BYTE*)m_pData; }
  32. _AFXCOLL_INLINE INT_PTR CByteArray::Add(BYTE newElement)
  33. { INT_PTR nIndex = m_nSize;
  34. SetAtGrow(nIndex, newElement);
  35. return nIndex; }
  36. _AFXCOLL_INLINE BYTE CByteArray::operator[](INT_PTR nIndex) const
  37. { return GetAt(nIndex); }
  38. _AFXCOLL_INLINE BYTE& CByteArray::operator[](INT_PTR nIndex)
  39. { return ElementAt(nIndex); }
  40. ////////////////////////////////////////////////////////////////////////////
  41. _AFXCOLL_INLINE INT_PTR CWordArray::GetSize() const
  42. { return m_nSize; }
  43. _AFXCOLL_INLINE INT_PTR CWordArray::GetUpperBound() const
  44. { return m_nSize-1; }
  45. _AFXCOLL_INLINE void CWordArray::RemoveAll()
  46. { SetSize(0); }
  47. _AFXCOLL_INLINE WORD CWordArray::GetAt(INT_PTR nIndex) const
  48. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  49. return m_pData[nIndex]; }
  50. _AFXCOLL_INLINE void CWordArray::SetAt(INT_PTR nIndex, WORD newElement)
  51. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  52. m_pData[nIndex] = newElement; }
  53. _AFXCOLL_INLINE WORD& CWordArray::ElementAt(INT_PTR nIndex)
  54. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  55. return m_pData[nIndex]; }
  56. _AFXCOLL_INLINE const WORD* CWordArray::GetData() const
  57. { return (const WORD*)m_pData; }
  58. _AFXCOLL_INLINE WORD* CWordArray::GetData()
  59. { return (WORD*)m_pData; }
  60. _AFXCOLL_INLINE INT_PTR CWordArray::Add(WORD newElement)
  61. { INT_PTR nIndex = m_nSize;
  62. SetAtGrow(nIndex, newElement);
  63. return nIndex; }
  64. _AFXCOLL_INLINE WORD CWordArray::operator[](INT_PTR nIndex) const
  65. { return GetAt(nIndex); }
  66. _AFXCOLL_INLINE WORD& CWordArray::operator[](INT_PTR nIndex)
  67. { return ElementAt(nIndex); }
  68. ////////////////////////////////////////////////////////////////////////////
  69. _AFXCOLL_INLINE INT_PTR CDWordArray::GetSize() const
  70. { return m_nSize; }
  71. _AFXCOLL_INLINE INT_PTR CDWordArray::GetUpperBound() const
  72. { return m_nSize-1; }
  73. _AFXCOLL_INLINE void CDWordArray::RemoveAll()
  74. { SetSize(0); }
  75. _AFXCOLL_INLINE DWORD CDWordArray::GetAt(INT_PTR nIndex) const
  76. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  77. return m_pData[nIndex]; }
  78. _AFXCOLL_INLINE void CDWordArray::SetAt(INT_PTR nIndex, DWORD newElement)
  79. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  80. m_pData[nIndex] = newElement; }
  81. _AFXCOLL_INLINE DWORD& CDWordArray::ElementAt(INT_PTR nIndex)
  82. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  83. return m_pData[nIndex]; }
  84. _AFXCOLL_INLINE const DWORD* CDWordArray::GetData() const
  85. { return (const DWORD*)m_pData; }
  86. _AFXCOLL_INLINE DWORD* CDWordArray::GetData()
  87. { return (DWORD*)m_pData; }
  88. _AFXCOLL_INLINE INT_PTR CDWordArray::Add(DWORD newElement)
  89. { INT_PTR nIndex = m_nSize;
  90. SetAtGrow(nIndex, newElement);
  91. return nIndex; }
  92. _AFXCOLL_INLINE DWORD CDWordArray::operator[](INT_PTR nIndex) const
  93. { return GetAt(nIndex); }
  94. _AFXCOLL_INLINE DWORD& CDWordArray::operator[](INT_PTR nIndex)
  95. { return ElementAt(nIndex); }
  96. ////////////////////////////////////////////////////////////////////////////
  97. _AFXCOLL_INLINE INT_PTR CUIntArray::GetSize() const
  98. { return m_nSize; }
  99. _AFXCOLL_INLINE INT_PTR CUIntArray::GetUpperBound() const
  100. { return m_nSize-1; }
  101. _AFXCOLL_INLINE void CUIntArray::RemoveAll()
  102. { SetSize(0); }
  103. _AFXCOLL_INLINE UINT CUIntArray::GetAt(INT_PTR nIndex) const
  104. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  105. return m_pData[nIndex]; }
  106. _AFXCOLL_INLINE void CUIntArray::SetAt(INT_PTR nIndex, UINT newElement)
  107. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  108. m_pData[nIndex] = newElement; }
  109. _AFXCOLL_INLINE UINT& CUIntArray::ElementAt(INT_PTR nIndex)
  110. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  111. return m_pData[nIndex]; }
  112. _AFXCOLL_INLINE const UINT* CUIntArray::GetData() const
  113. { return (const UINT*)m_pData; }
  114. _AFXCOLL_INLINE UINT* CUIntArray::GetData()
  115. { return (UINT*)m_pData; }
  116. _AFXCOLL_INLINE INT_PTR CUIntArray::Add(UINT newElement)
  117. { INT_PTR nIndex = m_nSize;
  118. SetAtGrow(nIndex, newElement);
  119. return nIndex; }
  120. _AFXCOLL_INLINE UINT CUIntArray::operator[](INT_PTR nIndex) const
  121. { return GetAt(nIndex); }
  122. _AFXCOLL_INLINE UINT& CUIntArray::operator[](INT_PTR nIndex)
  123. { return ElementAt(nIndex); }
  124. ////////////////////////////////////////////////////////////////////////////
  125. _AFXCOLL_INLINE INT_PTR CPtrArray::GetSize() const
  126. { return m_nSize; }
  127. _AFXCOLL_INLINE INT_PTR CPtrArray::GetUpperBound() const
  128. { return m_nSize-1; }
  129. _AFXCOLL_INLINE void CPtrArray::RemoveAll()
  130. { SetSize(0); }
  131. _AFXCOLL_INLINE void* CPtrArray::GetAt(INT_PTR nIndex) const
  132. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  133. return m_pData[nIndex]; }
  134. _AFXCOLL_INLINE void CPtrArray::SetAt(INT_PTR nIndex, void* newElement)
  135. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  136. m_pData[nIndex] = newElement; }
  137. _AFXCOLL_INLINE void*& CPtrArray::ElementAt(INT_PTR nIndex)
  138. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  139. return m_pData[nIndex]; }
  140. _AFXCOLL_INLINE const void** CPtrArray::GetData() const
  141. { return (const void**)m_pData; }
  142. _AFXCOLL_INLINE void** CPtrArray::GetData()
  143. { return (void**)m_pData; }
  144. _AFXCOLL_INLINE INT_PTR CPtrArray::Add(void* newElement)
  145. { INT_PTR nIndex = m_nSize;
  146. SetAtGrow(nIndex, newElement);
  147. return nIndex; }
  148. _AFXCOLL_INLINE void* CPtrArray::operator[](INT_PTR nIndex) const
  149. { return GetAt(nIndex); }
  150. _AFXCOLL_INLINE void*& CPtrArray::operator[](INT_PTR nIndex)
  151. { return ElementAt(nIndex); }
  152. ////////////////////////////////////////////////////////////////////////////
  153. _AFXCOLL_INLINE INT_PTR CObArray::GetSize() const
  154. { return m_nSize; }
  155. _AFXCOLL_INLINE INT_PTR CObArray::GetUpperBound() const
  156. { return m_nSize-1; }
  157. _AFXCOLL_INLINE void CObArray::RemoveAll()
  158. { SetSize(0); }
  159. _AFXCOLL_INLINE CObject* CObArray::GetAt(INT_PTR nIndex) const
  160. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  161. return m_pData[nIndex]; }
  162. _AFXCOLL_INLINE void CObArray::SetAt(INT_PTR nIndex, CObject* newElement)
  163. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  164. m_pData[nIndex] = newElement; }
  165. _AFXCOLL_INLINE CObject*& CObArray::ElementAt(INT_PTR nIndex)
  166. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  167. return m_pData[nIndex]; }
  168. _AFXCOLL_INLINE const CObject** CObArray::GetData() const
  169. { return (const CObject**)m_pData; }
  170. _AFXCOLL_INLINE CObject** CObArray::GetData()
  171. { return (CObject**)m_pData; }
  172. _AFXCOLL_INLINE INT_PTR CObArray::Add(CObject* newElement)
  173. { INT_PTR nIndex = m_nSize;
  174. SetAtGrow(nIndex, newElement);
  175. return nIndex; }
  176. _AFXCOLL_INLINE CObject* CObArray::operator[](INT_PTR nIndex) const
  177. { return GetAt(nIndex); }
  178. _AFXCOLL_INLINE CObject*& CObArray::operator[](INT_PTR nIndex)
  179. { return ElementAt(nIndex); }
  180. ////////////////////////////////////////////////////////////////////////////
  181. _AFXCOLL_INLINE INT_PTR CStringArray::GetSize() const
  182. { return m_nSize; }
  183. _AFXCOLL_INLINE INT_PTR CStringArray::GetUpperBound() const
  184. { return m_nSize-1; }
  185. _AFXCOLL_INLINE void CStringArray::RemoveAll()
  186. { SetSize(0); }
  187. _AFXCOLL_INLINE CString CStringArray::GetAt(INT_PTR nIndex) const
  188. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  189. return m_pData[nIndex]; }
  190. _AFXCOLL_INLINE void CStringArray::SetAt(INT_PTR nIndex, LPCTSTR newElement)
  191. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  192. m_pData[nIndex] = newElement; }
  193. #if _MFC_VER >= 0x0600
  194. _AFXCOLL_INLINE void CStringArray::SetAt(INT_PTR nIndex, const CString& newElement)
  195. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  196. m_pData[nIndex] = newElement; }
  197. #endif
  198. _AFXCOLL_INLINE CString& CStringArray::ElementAt(INT_PTR nIndex)
  199. { ASSERT(nIndex >= 0 && nIndex < m_nSize);
  200. return m_pData[nIndex]; }
  201. _AFXCOLL_INLINE const CString* CStringArray::GetData() const
  202. { return (const CString*)m_pData; }
  203. _AFXCOLL_INLINE CString* CStringArray::GetData()
  204. { return (CString*)m_pData; }
  205. _AFXCOLL_INLINE INT_PTR CStringArray::Add(LPCTSTR newElement)
  206. { INT_PTR nIndex = m_nSize;
  207. SetAtGrow(nIndex, newElement);
  208. return nIndex; }
  209. #if _MFC_VER >= 0x0600
  210. _AFXCOLL_INLINE INT_PTR CStringArray::Add(const CString& newElement)
  211. { INT_PTR nIndex = m_nSize;
  212. SetAtGrow(nIndex, newElement);
  213. return nIndex; }
  214. #endif
  215. _AFXCOLL_INLINE CString CStringArray::operator[](INT_PTR nIndex) const
  216. { return GetAt(nIndex); }
  217. _AFXCOLL_INLINE CString& CStringArray::operator[](INT_PTR nIndex)
  218. { return ElementAt(nIndex); }
  219. ////////////////////////////////////////////////////////////////////////////
  220. _AFXCOLL_INLINE INT_PTR CPtrList::GetCount() const
  221. { return m_nCount; }
  222. _AFXCOLL_INLINE BOOL CPtrList::IsEmpty() const
  223. { return m_nCount == 0; }
  224. _AFXCOLL_INLINE void*& CPtrList::GetHead()
  225. { ASSERT(m_pNodeHead != NULL);
  226. return m_pNodeHead->data; }
  227. _AFXCOLL_INLINE void* CPtrList::GetHead() const
  228. { ASSERT(m_pNodeHead != NULL);
  229. return m_pNodeHead->data; }
  230. _AFXCOLL_INLINE void*& CPtrList::GetTail()
  231. { ASSERT(m_pNodeTail != NULL);
  232. return m_pNodeTail->data; }
  233. _AFXCOLL_INLINE void* CPtrList::GetTail() const
  234. { ASSERT(m_pNodeTail != NULL);
  235. return m_pNodeTail->data; }
  236. _AFXCOLL_INLINE POSITION CPtrList::GetHeadPosition() const
  237. { return (POSITION) m_pNodeHead; }
  238. _AFXCOLL_INLINE POSITION CPtrList::GetTailPosition() const
  239. { return (POSITION) m_pNodeTail; }
  240. _AFXCOLL_INLINE void*& CPtrList::GetNext(POSITION& rPosition) // return *Position++
  241. { CNode* pNode = (CNode*) rPosition;
  242. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  243. rPosition = (POSITION) pNode->pNext;
  244. return pNode->data; }
  245. _AFXCOLL_INLINE void* CPtrList::GetNext(POSITION& rPosition) const // return *Position++
  246. { CNode* pNode = (CNode*) rPosition;
  247. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  248. rPosition = (POSITION) pNode->pNext;
  249. return pNode->data; }
  250. _AFXCOLL_INLINE void*& CPtrList::GetPrev(POSITION& rPosition) // return *Position--
  251. { CNode* pNode = (CNode*) rPosition;
  252. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  253. rPosition = (POSITION) pNode->pPrev;
  254. return pNode->data; }
  255. _AFXCOLL_INLINE void* CPtrList::GetPrev(POSITION& rPosition) const // return *Position--
  256. { CNode* pNode = (CNode*) rPosition;
  257. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  258. rPosition = (POSITION) pNode->pPrev;
  259. return pNode->data; }
  260. _AFXCOLL_INLINE void*& CPtrList::GetAt(POSITION position)
  261. { CNode* pNode = (CNode*) position;
  262. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  263. return pNode->data; }
  264. _AFXCOLL_INLINE void* CPtrList::GetAt(POSITION position) const
  265. { CNode* pNode = (CNode*) position;
  266. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  267. return pNode->data; }
  268. _AFXCOLL_INLINE void CPtrList::SetAt(POSITION pos, void* newElement)
  269. { CNode* pNode = (CNode*) pos;
  270. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  271. pNode->data = newElement; }
  272. ////////////////////////////////////////////////////////////////////////////
  273. _AFXCOLL_INLINE INT_PTR CObList::GetCount() const
  274. { return m_nCount; }
  275. _AFXCOLL_INLINE BOOL CObList::IsEmpty() const
  276. { return m_nCount == 0; }
  277. _AFXCOLL_INLINE CObject*& CObList::GetHead()
  278. { ASSERT(m_pNodeHead != NULL);
  279. return m_pNodeHead->data; }
  280. _AFXCOLL_INLINE CObject* CObList::GetHead() const
  281. { ASSERT(m_pNodeHead != NULL);
  282. return m_pNodeHead->data; }
  283. _AFXCOLL_INLINE CObject*& CObList::GetTail()
  284. { ASSERT(m_pNodeTail != NULL);
  285. return m_pNodeTail->data; }
  286. _AFXCOLL_INLINE CObject* CObList::GetTail() const
  287. { ASSERT(m_pNodeTail != NULL);
  288. return m_pNodeTail->data; }
  289. _AFXCOLL_INLINE POSITION CObList::GetHeadPosition() const
  290. { return (POSITION) m_pNodeHead; }
  291. _AFXCOLL_INLINE POSITION CObList::GetTailPosition() const
  292. { return (POSITION) m_pNodeTail; }
  293. _AFXCOLL_INLINE CObject*& CObList::GetNext(POSITION& rPosition) // return *Position++
  294. { CNode* pNode = (CNode*) rPosition;
  295. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  296. rPosition = (POSITION) pNode->pNext;
  297. return pNode->data; }
  298. _AFXCOLL_INLINE CObject* CObList::GetNext(POSITION& rPosition) const // return *Position++
  299. { CNode* pNode = (CNode*) rPosition;
  300. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  301. rPosition = (POSITION) pNode->pNext;
  302. return pNode->data; }
  303. _AFXCOLL_INLINE CObject*& CObList::GetPrev(POSITION& rPosition) // return *Position--
  304. { CNode* pNode = (CNode*) rPosition;
  305. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  306. rPosition = (POSITION) pNode->pPrev;
  307. return pNode->data; }
  308. _AFXCOLL_INLINE CObject* CObList::GetPrev(POSITION& rPosition) const // return *Position--
  309. { CNode* pNode = (CNode*) rPosition;
  310. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  311. rPosition = (POSITION) pNode->pPrev;
  312. return pNode->data; }
  313. _AFXCOLL_INLINE CObject*& CObList::GetAt(POSITION position)
  314. { CNode* pNode = (CNode*) position;
  315. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  316. return pNode->data; }
  317. _AFXCOLL_INLINE CObject* CObList::GetAt(POSITION position) const
  318. { CNode* pNode = (CNode*) position;
  319. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  320. return pNode->data; }
  321. _AFXCOLL_INLINE void CObList::SetAt(POSITION pos, CObject* newElement)
  322. { CNode* pNode = (CNode*) pos;
  323. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  324. pNode->data = newElement; }
  325. ////////////////////////////////////////////////////////////////////////////
  326. _AFXCOLL_INLINE INT_PTR CStringList::GetCount() const
  327. { return m_nCount; }
  328. _AFXCOLL_INLINE BOOL CStringList::IsEmpty() const
  329. { return m_nCount == 0; }
  330. _AFXCOLL_INLINE CString& CStringList::GetHead()
  331. { ASSERT(m_pNodeHead != NULL);
  332. return m_pNodeHead->data; }
  333. _AFXCOLL_INLINE CString CStringList::GetHead() const
  334. { ASSERT(m_pNodeHead != NULL);
  335. return m_pNodeHead->data; }
  336. _AFXCOLL_INLINE CString& CStringList::GetTail()
  337. { ASSERT(m_pNodeTail != NULL);
  338. return m_pNodeTail->data; }
  339. _AFXCOLL_INLINE CString CStringList::GetTail() const
  340. { ASSERT(m_pNodeTail != NULL);
  341. return m_pNodeTail->data; }
  342. _AFXCOLL_INLINE POSITION CStringList::GetHeadPosition() const
  343. { return (POSITION) m_pNodeHead; }
  344. _AFXCOLL_INLINE POSITION CStringList::GetTailPosition() const
  345. { return (POSITION) m_pNodeTail; }
  346. _AFXCOLL_INLINE CString& CStringList::GetNext(POSITION& rPosition) // return *Position++
  347. { CNode* pNode = (CNode*) rPosition;
  348. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  349. rPosition = (POSITION) pNode->pNext;
  350. return pNode->data; }
  351. _AFXCOLL_INLINE CString CStringList::GetNext(POSITION& rPosition) const // return *Position++
  352. { CNode* pNode = (CNode*) rPosition;
  353. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  354. rPosition = (POSITION) pNode->pNext;
  355. return pNode->data; }
  356. _AFXCOLL_INLINE CString& CStringList::GetPrev(POSITION& rPosition) // return *Position--
  357. { CNode* pNode = (CNode*) rPosition;
  358. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  359. rPosition = (POSITION) pNode->pPrev;
  360. return pNode->data; }
  361. _AFXCOLL_INLINE CString CStringList::GetPrev(POSITION& rPosition) const // return *Position--
  362. { CNode* pNode = (CNode*) rPosition;
  363. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  364. rPosition = (POSITION) pNode->pPrev;
  365. return pNode->data; }
  366. _AFXCOLL_INLINE CString& CStringList::GetAt(POSITION position)
  367. { CNode* pNode = (CNode*) position;
  368. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  369. return pNode->data; }
  370. _AFXCOLL_INLINE CString CStringList::GetAt(POSITION position) const
  371. { CNode* pNode = (CNode*) position;
  372. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  373. return pNode->data; }
  374. _AFXCOLL_INLINE void CStringList::SetAt(POSITION pos, LPCTSTR newElement)
  375. { CNode* pNode = (CNode*) pos;
  376. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  377. pNode->data = newElement; }
  378. #if _MFC_VER >= 0x0600
  379. _AFXCOLL_INLINE void CStringList::SetAt(POSITION pos, const CString& newElement)
  380. { CNode* pNode = (CNode*) pos;
  381. ASSERT(AfxIsValidAddress(pNode, sizeof(CNode)));
  382. pNode->data = newElement; }
  383. #endif
  384. ////////////////////////////////////////////////////////////////////////////
  385. _AFXCOLL_INLINE INT_PTR CMapWordToPtr::GetCount() const
  386. { return m_nCount; }
  387. _AFXCOLL_INLINE BOOL CMapWordToPtr::IsEmpty() const
  388. { return m_nCount == 0; }
  389. _AFXCOLL_INLINE void CMapWordToPtr::SetAt(WORD key, void* newValue)
  390. { (*this)[key] = newValue; }
  391. _AFXCOLL_INLINE POSITION CMapWordToPtr::GetStartPosition() const
  392. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  393. _AFXCOLL_INLINE UINT CMapWordToPtr::GetHashTableSize() const
  394. { return m_nHashTableSize; }
  395. ////////////////////////////////////////////////////////////////////////////
  396. _AFXCOLL_INLINE INT_PTR CMapPtrToWord::GetCount() const
  397. { return m_nCount; }
  398. _AFXCOLL_INLINE BOOL CMapPtrToWord::IsEmpty() const
  399. { return m_nCount == 0; }
  400. _AFXCOLL_INLINE void CMapPtrToWord::SetAt(void* key, WORD newValue)
  401. { (*this)[key] = newValue; }
  402. _AFXCOLL_INLINE POSITION CMapPtrToWord::GetStartPosition() const
  403. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  404. _AFXCOLL_INLINE UINT CMapPtrToWord::GetHashTableSize() const
  405. { return m_nHashTableSize; }
  406. ////////////////////////////////////////////////////////////////////////////
  407. _AFXCOLL_INLINE INT_PTR CMapPtrToPtr::GetCount() const
  408. { return m_nCount; }
  409. _AFXCOLL_INLINE BOOL CMapPtrToPtr::IsEmpty() const
  410. { return m_nCount == 0; }
  411. _AFXCOLL_INLINE void CMapPtrToPtr::SetAt(void* key, void* newValue)
  412. { (*this)[key] = newValue; }
  413. _AFXCOLL_INLINE POSITION CMapPtrToPtr::GetStartPosition() const
  414. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  415. _AFXCOLL_INLINE UINT CMapPtrToPtr::GetHashTableSize() const
  416. { return m_nHashTableSize; }
  417. ////////////////////////////////////////////////////////////////////////////
  418. _AFXCOLL_INLINE INT_PTR CMapWordToOb::GetCount() const
  419. { return m_nCount; }
  420. _AFXCOLL_INLINE BOOL CMapWordToOb::IsEmpty() const
  421. { return m_nCount == 0; }
  422. _AFXCOLL_INLINE void CMapWordToOb::SetAt(WORD key, CObject* newValue)
  423. { (*this)[key] = newValue; }
  424. _AFXCOLL_INLINE POSITION CMapWordToOb::GetStartPosition() const
  425. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  426. _AFXCOLL_INLINE UINT CMapWordToOb::GetHashTableSize() const
  427. { return m_nHashTableSize; }
  428. ////////////////////////////////////////////////////////////////////////////
  429. _AFXCOLL_INLINE INT_PTR CMapStringToPtr::GetCount() const
  430. { return m_nCount; }
  431. _AFXCOLL_INLINE BOOL CMapStringToPtr::IsEmpty() const
  432. { return m_nCount == 0; }
  433. _AFXCOLL_INLINE void CMapStringToPtr::SetAt(LPCTSTR key, void* newValue)
  434. { (*this)[key] = newValue; }
  435. _AFXCOLL_INLINE POSITION CMapStringToPtr::GetStartPosition() const
  436. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  437. _AFXCOLL_INLINE UINT CMapStringToPtr::GetHashTableSize() const
  438. { return m_nHashTableSize; }
  439. ////////////////////////////////////////////////////////////////////////////
  440. _AFXCOLL_INLINE INT_PTR CMapStringToOb::GetCount() const
  441. { return m_nCount; }
  442. _AFXCOLL_INLINE BOOL CMapStringToOb::IsEmpty() const
  443. { return m_nCount == 0; }
  444. _AFXCOLL_INLINE void CMapStringToOb::SetAt(LPCTSTR key, CObject* newValue)
  445. { (*this)[key] = newValue; }
  446. _AFXCOLL_INLINE POSITION CMapStringToOb::GetStartPosition() const
  447. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  448. _AFXCOLL_INLINE UINT CMapStringToOb::GetHashTableSize() const
  449. { return m_nHashTableSize; }
  450. ////////////////////////////////////////////////////////////////////////////
  451. _AFXCOLL_INLINE INT_PTR CMapStringToString::GetCount() const
  452. { return m_nCount; }
  453. _AFXCOLL_INLINE BOOL CMapStringToString::IsEmpty() const
  454. { return m_nCount == 0; }
  455. _AFXCOLL_INLINE void CMapStringToString::SetAt(LPCTSTR key, LPCTSTR newValue)
  456. { (*this)[key] = newValue; }
  457. _AFXCOLL_INLINE POSITION CMapStringToString::GetStartPosition() const
  458. { return (m_nCount == 0) ? NULL : BEFORE_START_POSITION; }
  459. _AFXCOLL_INLINE UINT CMapStringToString::GetHashTableSize() const
  460. { return m_nHashTableSize; }
  461. /////////////////////////////////////////////////////////////////////////////
  462. #endif //_AFXCOLL_INLINE