ReactOS  0.4.14-dev-552-g2fad488
ATL::CAtlList< E, ETraits > Class Template Reference

#include <atlcoll.h>

Collaboration diagram for ATL::CAtlList< E, ETraits >:

Classes

class  CNode
 

Public Member Functions

 CAtlList (_In_ UINT nBlockSize=10)
 
 ~CAtlList ()
 
size_t GetCount () const
 
bool IsEmpty () const
 
POSITION GetHeadPosition () const
 
POSITION GetTailPosition () const
 
EGetNext (_Inout_ POSITION &pos)
 
const EGetNext (_Inout_ POSITION &pos) const
 
EGetPrev (_Inout_ POSITION &pos)
 
const EGetPrev (_Inout_ POSITION &pos) const
 
EGetAt (_In_ POSITION pos)
 
const EGetAt (_In_ POSITION pos) const
 
POSITION AddHead (INARGTYPE element)
 
POSITION AddTail (INARGTYPE element)
 
E RemoveHead ()
 
E RemoveTail ()
 
POSITION InsertBefore (_In_ POSITION pos, INARGTYPE element)
 
POSITION InsertAfter (_In_ POSITION pos, INARGTYPE element)
 
void RemoveAll ()
 
void RemoveAt (_In_ POSITION pos)
 
POSITION Find (INARGTYPE element, _In_opt_ POSITION posStartAfter=NULL) const
 
POSITION FindIndex (_In_ size_t iElement) const
 

Private Types

typedef ETraits::INARGTYPE INARGTYPE
 

Private Member Functions

 CAtlList (_In_ const CAtlList &)
 
CAtlListoperator= (_In_ const CAtlList &)
 
CNodeCreateNode (INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
 
void FreeNode (_Inout_ CNode *pNode)
 
CNodeGetFreeNode ()
 

Private Attributes

CAtlPlexm_Blocks
 
UINT m_BlockSize
 
CNodem_HeadNode
 
CNodem_TailNode
 
CNodem_FreeNode
 
size_t m_NumElements
 

Detailed Description

template<typename E, class ETraits = CElementTraits<E>>
class ATL::CAtlList< E, ETraits >

Definition at line 398 of file atlcoll.h.

Member Typedef Documentation

◆ INARGTYPE

template<typename E, class ETraits = CElementTraits<E>>
typedef ETraits::INARGTYPE ATL::CAtlList< E, ETraits >::INARGTYPE
private

Definition at line 401 of file atlcoll.h.

Constructor & Destructor Documentation

◆ CAtlList() [1/2]

template<typename E, class ETraits = CElementTraits<E>>
ATL::CAtlList< E, ETraits >::CAtlList ( _In_ const CAtlList< E, ETraits > &  )
private

◆ CAtlList() [2/2]

template<typename E , class ETraits >
ATL::CAtlList< E, ETraits >::CAtlList ( _In_ UINT  nBlockSize = 10)

Definition at line 493 of file atlcoll.h.

493  :
494  m_Blocks(NULL),
495  m_BlockSize(nBlockSize),
496  m_HeadNode(NULL),
497  m_TailNode(NULL),
498  m_FreeNode(NULL),
499  m_NumElements(0)
500 {
501  ATLASSERT(nBlockSize > 0);
502 }
UINT m_BlockSize
Definition: atlcoll.h:425
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
CAtlPlex * m_Blocks
Definition: atlcoll.h:424
smooth NULL
Definition: ftsmooth.c:416
size_t m_NumElements
Definition: atlcoll.h:429
CNode * m_FreeNode
Definition: atlcoll.h:428
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427

◆ ~CAtlList()

template<typename E , class ETraits >
ATL::CAtlList< E, ETraits >::~CAtlList ( void  )

Definition at line 505 of file atlcoll.h.

506 {
507  RemoveAll();
508 }
void RemoveAll()
Definition: atlcoll.h:699

Member Function Documentation

◆ AddHead()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::AddHead ( INARGTYPE  element)

Definition at line 581 of file atlcoll.h.

582 {
584  if (m_HeadNode)
585  {
587  }
588  else
589  {
590  m_TailNode = Node;
591  }
592  m_HeadNode = Node;
593 
594  return (POSITION)Node;
595 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:792
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

Referenced by START_TEST().

◆ AddTail()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::AddTail ( INARGTYPE  element)

Definition at line 598 of file atlcoll.h.

599 {
601  if (m_TailNode)
602  {
604  }
605  else
606  {
607  m_HeadNode = Node;
608  }
609  m_TailNode = Node;
610 
611  return (POSITION)Node;
612 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:792
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

Referenced by CAvailableApps::Enum(), CFontCache::Insert(), and START_TEST().

◆ CreateNode()

template<typename E , class ETraits >
CAtlList< E, ETraits >::CNode * ATL::CAtlList< E, ETraits >::CreateNode ( INARGTYPE  element,
_In_opt_ CNode pPrev,
_In_opt_ CNode pNext 
)
private

Definition at line 792 of file atlcoll.h.

797 {
798  GetFreeNode();
799 
800  CNode* NewNode = m_FreeNode;
801  CNode* NextFree = m_FreeNode->m_Next;
802 
803  NewNode = new CNode(element);
804 
805  m_FreeNode = NextFree;
806  NewNode->m_Prev = Prev;
807  NewNode->m_Next = Next;
808  m_NumElements++;
809 
810  return NewNode;
811 }
CNode * GetFreeNode()
Definition: atlcoll.h:830
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:429
CNode * m_FreeNode
Definition: atlcoll.h:428

◆ Find()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::Find ( INARGTYPE  element,
_In_opt_ POSITION  posStartAfter = NULL 
) const

Definition at line 745 of file atlcoll.h.

748 {
749  CNode* Node = (CNode*)posStartAfter;
750  if (Node == NULL)
751  {
752  Node = m_HeadNode;
753  }
754  else
755  {
756  Node = Node->m_Next;
757  }
758 
759  for (; Node != NULL; Node = Node->m_Next)
760  {
761  if (ETraits::CompareElements(Node->m_Element, element))
762  return (POSITION)Node;
763  }
764 
765  return NULL;
766 }
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:426
Definition: dlist.c:348

◆ FindIndex()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::FindIndex ( _In_ size_t  iElement) const

Definition at line 769 of file atlcoll.h.

770 {
771  if (iElement >= m_NumElements)
772  return NULL;
773 
774  if (m_HeadNode == NULL)
775  return NULL;
776 
777  CNode* Node = m_HeadNode;
778  for (size_t i = 0; i < iElement; i++)
779  {
780  Node = Node->m_Next;
781  }
782 
783  return (POSITION)Node;
784 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:429
CNode * m_HeadNode
Definition: atlcoll.h:426
Definition: dlist.c:348

◆ FreeNode()

template<typename E , class ETraits >
void ATL::CAtlList< E, ETraits >::FreeNode ( _Inout_ CNode pNode)
private

Definition at line 814 of file atlcoll.h.

817 {
818  pNode->~CNode();
819  pNode->m_Next = m_FreeNode;
820  m_FreeNode = pNode;
821 
822  m_NumElements--;
823  if (m_NumElements == 0)
824  {
825  RemoveAll();
826  }
827 }
void RemoveAll()
Definition: atlcoll.h:699
size_t m_NumElements
Definition: atlcoll.h:429
CNode * m_FreeNode
Definition: atlcoll.h:428

◆ GetAt() [1/2]

template<typename E , class ETraits >
E & ATL::CAtlList< E, ETraits >::GetAt ( _In_ POSITION  pos)
inline

Definition at line 567 of file atlcoll.h.

568 {
569  CNode* Node = (CNode*)pos;
570  return Node->m_Element;
571 }
Definition: Node.h:12
Definition: dlist.c:348

◆ GetAt() [2/2]

template<typename E , class ETraits >
const E & ATL::CAtlList< E, ETraits >::GetAt ( _In_ POSITION  pos) const
inline

Definition at line 574 of file atlcoll.h.

575 {
576  CNode* Node = (CNode*)pos;
577  return Node->m_Element;
578 }
Definition: Node.h:12
Definition: dlist.c:348

◆ GetCount()

template<typename E , class ETraits >
size_t ATL::CAtlList< E, ETraits >::GetCount ( ) const
inline

Definition at line 511 of file atlcoll.h.

512 {
513  return m_NumElements;
514 }
size_t m_NumElements
Definition: atlcoll.h:429

Referenced by CFontCache::Read(), and START_TEST().

◆ GetFreeNode()

template<typename E , class ETraits >
CAtlList< E, ETraits >::CNode * ATL::CAtlList< E, ETraits >::GetFreeNode ( )
private

Definition at line 830 of file atlcoll.h.

831 {
832  if (m_FreeNode)
833  {
834  return m_FreeNode;
835  }
836 
837  CAtlPlex* Block = CAtlPlex::Create(m_Blocks, m_BlockSize, sizeof(CNode));
838  if (Block == NULL)
839  {
841  }
842 
843  CNode* Node = (CNode*)Block->GetData();
844  Node += (m_BlockSize - 1);
845  for (int i = m_BlockSize - 1; i >= 0; i--)
846  {
847  Node->m_Next = m_FreeNode;
848  m_FreeNode = Node;
849  Node--;
850  }
851 
852  return m_FreeNode;
853 }
UINT m_BlockSize
Definition: atlcoll.h:425
CAtlPlex * m_Blocks
Definition: atlcoll.h:424
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
void * GetData()
Definition: atlcoll.h:58
void AtlThrowImp(HRESULT hr)
Definition: atlexcept.h:18
CNode * m_FreeNode
Definition: atlcoll.h:428
static CAtlPlex * Create(_Inout_ CAtlPlex *&Entry, _In_ size_t MaxElements, _In_ size_t ElementSize)
Definition: atlcoll.h:35
Definition: dlist.c:348

◆ GetHeadPosition()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::GetHeadPosition ( ) const
inline

◆ GetNext() [1/2]

template<typename E , class ETraits >
E & ATL::CAtlList< E, ETraits >::GetNext ( _Inout_ POSITION pos)
inline

Definition at line 535 of file atlcoll.h.

536 {
537  CNode* Node = (CNode*)pos;
538  pos = (POSITION)Node->m_Next;
539  return Node->m_Element;
540 }
Definition: Node.h:12
__POSITION * POSITION
Definition: atlcoll.h:20
Definition: dlist.c:348

Referenced by CAvailableApps::Enum(), CAvailableApps::FindInfo(), CAvailableApps::FreeCachedEntries(), CAvailableApps::GetSelected(), CFontCache::Insert(), CFontCache::Read(), and START_TEST().

◆ GetNext() [2/2]

template<typename E , class ETraits >
const E & ATL::CAtlList< E, ETraits >::GetNext ( _Inout_ POSITION pos) const
inline

Definition at line 543 of file atlcoll.h.

544 {
545  CNode* Node = (CNode*)pos;
546  pos = (POSITION)Node->m_Next;
547  return Node->m_Element;
548 }
Definition: Node.h:12
__POSITION * POSITION
Definition: atlcoll.h:20
Definition: dlist.c:348

◆ GetPrev() [1/2]

template<typename E , class ETraits >
E & ATL::CAtlList< E, ETraits >::GetPrev ( _Inout_ POSITION pos)
inline

Definition at line 551 of file atlcoll.h.

552 {
553  CNode* Node = (CNode*)pos;
554  pos = (POSITION)Node->m_Prev;
555  return Node->m_Element;
556 }
Definition: Node.h:12
__POSITION * POSITION
Definition: atlcoll.h:20
Definition: dlist.c:348

◆ GetPrev() [2/2]

template<typename E , class ETraits >
const E & ATL::CAtlList< E, ETraits >::GetPrev ( _Inout_ POSITION pos) const
inline

Definition at line 559 of file atlcoll.h.

560 {
561  CNode* Node = (CNode*)pos;
562  pos = (POSITION)Node->m_Prev;
563  return Node->m_Element;
564 }
Definition: Node.h:12
__POSITION * POSITION
Definition: atlcoll.h:20
Definition: dlist.c:348

◆ GetTailPosition()

template<typename E , class ETraits >
POSITION ATL::CAtlList< E, ETraits >::GetTailPosition ( ) const
inline

Definition at line 529 of file atlcoll.h.

530 {
531  return (POSITION)m_TailNode;
532 }
CNode * m_TailNode
Definition: atlcoll.h:427

◆ InsertAfter()

template<typename E, class ETraits = CElementTraits<E>>
POSITION ATL::CAtlList< E, ETraits >::InsertAfter ( _In_ POSITION  pos,
INARGTYPE  element 
)

Definition at line 677 of file atlcoll.h.

678 {
679  if (pos == NULL)
680  return AddTail(element);
681 
682  CNode* OldNode = (CNode*)pos;
683  CNode* Node = CreateNode(element, OldNode, OldNode->m_Next);
684 
685  if (OldNode->m_Next != NULL)
686  {
687  OldNode->m_Next->m_Prev = Node;
688  }
689  else
690  {
691  m_TailNode = Node;
692  }
693  OldNode->m_Next = Node;
694 
695  return (POSITION)Node;
696 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:792
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
POSITION AddTail(INARGTYPE element)
Definition: atlcoll.h:598
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

Referenced by START_TEST().

◆ InsertBefore()

template<typename E, class ETraits = CElementTraits<E>>
POSITION ATL::CAtlList< E, ETraits >::InsertBefore ( _In_ POSITION  pos,
INARGTYPE  element 
)

Definition at line 655 of file atlcoll.h.

656 {
657  if (pos == NULL)
658  return AddHead(element);
659 
660  CNode* OldNode = (CNode*)pos;
661  CNode* Node = CreateNode(element, OldNode->m_Prev, OldNode);
662 
663  if (OldNode->m_Prev != NULL)
664  {
665  OldNode->m_Prev->m_Next = Node;
666  }
667  else
668  {
669  m_HeadNode = Node;
670  }
671  OldNode->m_Prev = Node;
672 
673  return (POSITION)Node;
674 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:792
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:426
POSITION AddHead(INARGTYPE element)
Definition: atlcoll.h:581
Definition: dlist.c:348

Referenced by CFontCache::Insert(), and START_TEST().

◆ IsEmpty()

template<typename E , class ETraits >
bool ATL::CAtlList< E, ETraits >::IsEmpty ( ) const
inline

Definition at line 517 of file atlcoll.h.

518 {
519  return (m_NumElements == 0);
520 }
size_t m_NumElements
Definition: atlcoll.h:429

Referenced by CAvailableApps::FindInfo().

◆ operator=()

template<typename E, class ETraits = CElementTraits<E>>
CAtlList& ATL::CAtlList< E, ETraits >::operator= ( _In_ const CAtlList< E, ETraits > &  )
private

◆ RemoveAll()

template<typename E , class ETraits >
void ATL::CAtlList< E, ETraits >::RemoveAll ( )

Definition at line 699 of file atlcoll.h.

700 {
701  while (m_NumElements > 0)
702  {
703  CNode* Node = m_HeadNode;
705  FreeNode(Node);
706  }
707 
708  m_HeadNode = NULL;
709  m_TailNode = NULL;
710  m_FreeNode = NULL;
711 
712  if (m_Blocks)
713  {
714  m_Blocks->Destroy();
715  m_Blocks = NULL;
716  }
717 }
CAtlPlex * m_Blocks
Definition: atlcoll.h:424
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:814
smooth NULL
Definition: ftsmooth.c:416
void Destroy()
Definition: atlcoll.h:63
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:429
CNode * m_FreeNode
Definition: atlcoll.h:428
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

Referenced by CAvailableApps::FreeCachedEntries().

◆ RemoveAt()

template<typename E , class ETraits >
void ATL::CAtlList< E, ETraits >::RemoveAt ( _In_ POSITION  pos)

Definition at line 720 of file atlcoll.h.

721 {
722  ATLASSERT(pos != NULL);
723 
724  CNode* OldNode = (CNode*)pos;
725  if (OldNode == m_HeadNode)
726  {
727  m_HeadNode = OldNode->m_Next;
728  }
729  else
730  {
731  OldNode->m_Prev->m_Next = OldNode->m_Next;
732  }
733  if (OldNode == m_TailNode)
734  {
735  m_TailNode = OldNode->m_Prev;
736  }
737  else
738  {
739  OldNode->m_Next->m_Prev = OldNode->m_Prev;
740  }
741  FreeNode(OldNode);
742 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:814
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427

Referenced by CAvailableApps::Enum().

◆ RemoveHead()

template<typename E , class ETraits >
E ATL::CAtlList< E, ETraits >::RemoveHead ( )

Definition at line 615 of file atlcoll.h.

616 {
617  CNode* Node = m_HeadNode;
618  E Element(Node->m_Element);
619 
620  m_HeadNode = Node->m_Next;
621  if (m_HeadNode)
622  {
624  }
625  else
626  {
627  m_TailNode = NULL;
628  }
629  FreeNode(Node);
630 
631  return Element;
632 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:814
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

◆ RemoveTail()

template<typename E , class ETraits >
E ATL::CAtlList< E, ETraits >::RemoveTail ( )

Definition at line 635 of file atlcoll.h.

636 {
637  CNode* Node = m_TailNode;
638  E Element(Node->m_Element);
639 
640  m_TailNode = Node->m_Prev;
641  if (m_TailNode)
642  {
644  }
645  else
646  {
647  m_HeadNode = NULL;
648  }
649  FreeNode(Node);
650 
651  return Element;
652 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:814
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:426
CNode * m_TailNode
Definition: atlcoll.h:427
Definition: dlist.c:348

Member Data Documentation

◆ m_Blocks

template<typename E, class ETraits = CElementTraits<E>>
CAtlPlex* ATL::CAtlList< E, ETraits >::m_Blocks
private

Definition at line 424 of file atlcoll.h.

◆ m_BlockSize

template<typename E, class ETraits = CElementTraits<E>>
UINT ATL::CAtlList< E, ETraits >::m_BlockSize
private

Definition at line 425 of file atlcoll.h.

◆ m_FreeNode

template<typename E, class ETraits = CElementTraits<E>>
CNode* ATL::CAtlList< E, ETraits >::m_FreeNode
private

Definition at line 428 of file atlcoll.h.

◆ m_HeadNode

template<typename E, class ETraits = CElementTraits<E>>
CNode* ATL::CAtlList< E, ETraits >::m_HeadNode
private

Definition at line 426 of file atlcoll.h.

◆ m_NumElements

template<typename E, class ETraits = CElementTraits<E>>
size_t ATL::CAtlList< E, ETraits >::m_NumElements
private

Definition at line 429 of file atlcoll.h.

◆ m_TailNode

template<typename E, class ETraits = CElementTraits<E>>
CNode* ATL::CAtlList< E, ETraits >::m_TailNode
private

Definition at line 427 of file atlcoll.h.


The documentation for this class was generated from the following file: