mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 05:51:44 +00:00
[ATL][ATL_APITEST] Test + implement CHeapPtrList
This commit is contained in:
parent
09cfb2823c
commit
008745d951
7 changed files with 340 additions and 1 deletions
|
@ -157,6 +157,17 @@ class CElementTraits :
|
|||
};
|
||||
|
||||
|
||||
template<typename T, class Allocator = CCRTAllocator>
|
||||
class CHeapPtrElementTraits :
|
||||
public CDefaultElementTraits< CHeapPtr<T, Allocator> >
|
||||
{
|
||||
public:
|
||||
typedef CHeapPtr<T, Allocator>& INARGTYPE;
|
||||
typedef T*& OUTARGTYPE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<typename E, class ETraits = CElementTraits<E> >
|
||||
class CAtlArray
|
||||
{
|
||||
|
@ -852,6 +863,23 @@ typename CAtlList<E, ETraits>::CNode* CAtlList< E, ETraits>::GetFreeNode()
|
|||
return m_FreeNode;
|
||||
}
|
||||
|
||||
|
||||
template<typename E, class Allocator = CCRTAllocator >
|
||||
class CHeapPtrList :
|
||||
public CAtlList<CHeapPtr<E, Allocator>, CHeapPtrElementTraits<E, Allocator> >
|
||||
{
|
||||
public:
|
||||
CHeapPtrList(_In_ UINT nBlockSize = 10) :
|
||||
CAtlList<CHeapPtr<E, Allocator>, CHeapPtrElementTraits<E, Allocator> >(nBlockSize)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
CHeapPtrList(const CHeapPtrList&);
|
||||
CHeapPtrList& operator=(const CHeapPtrList*);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue