ReactOS  0.4.14-dev-52-g6116262
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 387 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 390 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 482 of file atlcoll.h.

482  :
483  m_Blocks(NULL),
484  m_BlockSize(nBlockSize),
485  m_HeadNode(NULL),
486  m_TailNode(NULL),
487  m_FreeNode(NULL),
488  m_NumElements(0)
489 {
490  ATLASSERT(nBlockSize > 0);
491 }
UINT m_BlockSize
Definition: atlcoll.h:414
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
CAtlPlex * m_Blocks
Definition: atlcoll.h:413
smooth NULL
Definition: ftsmooth.c:416
size_t m_NumElements
Definition: atlcoll.h:418
CNode * m_FreeNode
Definition: atlcoll.h:417
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416

◆ ~CAtlList()

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

Definition at line 494 of file atlcoll.h.

495 {
496  RemoveAll();
497 }
void RemoveAll()
Definition: atlcoll.h:688

Member Function Documentation

◆ AddHead()

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

Definition at line 570 of file atlcoll.h.

571 {
573  if (m_HeadNode)
574  {
576  }
577  else
578  {
579  m_TailNode = Node;
580  }
581  m_HeadNode = Node;
582 
583  return (POSITION)Node;
584 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:781
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416
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 587 of file atlcoll.h.

588 {
590  if (m_TailNode)
591  {
593  }
594  else
595  {
596  m_HeadNode = Node;
597  }
598  m_TailNode = Node;
599 
600  return (POSITION)Node;
601 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:781
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416
Definition: dlist.c:348

Referenced by CAvailableApps::Enum(), 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 781 of file atlcoll.h.

786 {
787  GetFreeNode();
788 
789  CNode* NewNode = m_FreeNode;
790  CNode* NextFree = m_FreeNode->m_Next;
791 
792  NewNode = new CNode(element);
793 
794  m_FreeNode = NextFree;
795  NewNode->m_Prev = Prev;
796  NewNode->m_Next = Next;
797  m_NumElements++;
798 
799  return NewNode;
800 }
CNode * GetFreeNode()
Definition: atlcoll.h:819
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:418
CNode * m_FreeNode
Definition: atlcoll.h:417

◆ Find()

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

Definition at line 734 of file atlcoll.h.

737 {
738  CNode* Node = (CNode*)posStartAfter;
739  if (Node == NULL)
740  {
741  Node = m_HeadNode;
742  }
743  else
744  {
745  Node = Node->m_Next;
746  }
747 
748  for (; Node != NULL; Node = Node->m_Next)
749  {
750  if (ETraits::CompareElements(Node->m_Element, element))
751  return (POSITION)Node;
752  }
753 
754  return NULL;
755 }
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:415
Definition: dlist.c:348

◆ FindIndex()

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

Definition at line 758 of file atlcoll.h.

759 {
760  if (iElement >= m_NumElements)
761  return NULL;
762 
763  if (m_HeadNode == NULL)
764  return NULL;
765 
766  CNode* Node = m_HeadNode;
767  for (size_t i = 0; i < iElement; i++)
768  {
769  Node = Node->m_Next;
770  }
771 
772  return (POSITION)Node;
773 }
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:418
CNode * m_HeadNode
Definition: atlcoll.h:415
Definition: dlist.c:348

◆ FreeNode()

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

Definition at line 803 of file atlcoll.h.

806 {
807  pNode->~CNode();
808  pNode->m_Next = m_FreeNode;
809  m_FreeNode = pNode;
810 
811  m_NumElements--;
812  if (m_NumElements == 0)
813  {
814  RemoveAll();
815  }
816 }
void RemoveAll()
Definition: atlcoll.h:688
size_t m_NumElements
Definition: atlcoll.h:418
CNode * m_FreeNode
Definition: atlcoll.h:417

◆ GetAt() [1/2]

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

Definition at line 556 of file atlcoll.h.

557 {
558  CNode* Node = (CNode*)pos;
559  return Node->m_Element;
560 }
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 563 of file atlcoll.h.

564 {
565  CNode* Node = (CNode*)pos;
566  return Node->m_Element;
567 }
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 500 of file atlcoll.h.

501 {
502  return m_NumElements;
503 }
size_t m_NumElements
Definition: atlcoll.h:418

Referenced by START_TEST().

◆ GetFreeNode()

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

Definition at line 819 of file atlcoll.h.

820 {
821  if (m_FreeNode)
822  {
823  return m_FreeNode;
824  }
825 
826  CAtlPlex* Block = CAtlPlex::Create(m_Blocks, m_BlockSize, sizeof(CNode));
827  if (Block == NULL)
828  {
830  }
831 
832  CNode* Node = (CNode*)Block->GetData();
833  Node += (m_BlockSize - 1);
834  for (int i = m_BlockSize - 1; i >= 0; i--)
835  {
836  Node->m_Next = m_FreeNode;
837  m_FreeNode = Node;
838  Node--;
839  }
840 
841  return m_FreeNode;
842 }
UINT m_BlockSize
Definition: atlcoll.h:414
CAtlPlex * m_Blocks
Definition: atlcoll.h:413
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:417
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 524 of file atlcoll.h.

525 {
526  CNode* Node = (CNode*)pos;
527  pos = (POSITION)Node->m_Next;
528  return Node->m_Element;
529 }
Definition: Node.h:12
__POSITION * POSITION
Definition: atlcoll.h:20
Definition: dlist.c:348

Referenced by CAvailableApps::Enum(), CAvailableApps::FindInfo(), CAvailableApps::FreeCachedEntries(), CAvailableApps::GetSelected(), 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 532 of file atlcoll.h.

533 {
534  CNode* Node = (CNode*)pos;
535  pos = (POSITION)Node->m_Next;
536  return Node->m_Element;
537 }
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 540 of file atlcoll.h.

541 {
542  CNode* Node = (CNode*)pos;
543  pos = (POSITION)Node->m_Prev;
544  return Node->m_Element;
545 }
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 548 of file atlcoll.h.

549 {
550  CNode* Node = (CNode*)pos;
551  pos = (POSITION)Node->m_Prev;
552  return Node->m_Element;
553 }
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 518 of file atlcoll.h.

519 {
520  return (POSITION)m_TailNode;
521 }
CNode * m_TailNode
Definition: atlcoll.h:416

◆ InsertAfter()

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

Definition at line 666 of file atlcoll.h.

667 {
668  if (pos == NULL)
669  return AddTail(element);
670 
671  CNode* OldNode = (CNode*)pos;
672  CNode* Node = CreateNode(element, OldNode, OldNode->m_Next);
673 
674  if (OldNode->m_Next != NULL)
675  {
676  OldNode->m_Next->m_Prev = Node;
677  }
678  else
679  {
680  m_TailNode = Node;
681  }
682  OldNode->m_Next = Node;
683 
684  return (POSITION)Node;
685 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:781
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
POSITION AddTail(INARGTYPE element)
Definition: atlcoll.h:587
CNode * m_TailNode
Definition: atlcoll.h:416
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 644 of file atlcoll.h.

645 {
646  if (pos == NULL)
647  return AddHead(element);
648 
649  CNode* OldNode = (CNode*)pos;
650  CNode* Node = CreateNode(element, OldNode->m_Prev, OldNode);
651 
652  if (OldNode->m_Prev != NULL)
653  {
654  OldNode->m_Prev->m_Next = Node;
655  }
656  else
657  {
658  m_HeadNode = Node;
659  }
660  OldNode->m_Prev = Node;
661 
662  return (POSITION)Node;
663 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:781
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:415
POSITION AddHead(INARGTYPE element)
Definition: atlcoll.h:570
Definition: dlist.c:348

Referenced by START_TEST().

◆ IsEmpty()

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

Definition at line 506 of file atlcoll.h.

507 {
508  return (m_NumElements == 0);
509 }
size_t m_NumElements
Definition: atlcoll.h:418

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 688 of file atlcoll.h.

689 {
690  while (m_NumElements > 0)
691  {
692  CNode* Node = m_HeadNode;
694  FreeNode(Node);
695  }
696 
697  m_HeadNode = NULL;
698  m_TailNode = NULL;
699  m_FreeNode = NULL;
700 
701  if (m_Blocks)
702  {
703  m_Blocks->Destroy();
704  m_Blocks = NULL;
705  }
706 }
CAtlPlex * m_Blocks
Definition: atlcoll.h:413
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:803
smooth NULL
Definition: ftsmooth.c:416
void Destroy()
Definition: atlcoll.h:63
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:418
CNode * m_FreeNode
Definition: atlcoll.h:417
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416
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 709 of file atlcoll.h.

710 {
711  ATLASSERT(pos != NULL);
712 
713  CNode* OldNode = (CNode*)pos;
714  if (OldNode == m_HeadNode)
715  {
716  m_HeadNode = OldNode->m_Next;
717  }
718  else
719  {
720  OldNode->m_Prev->m_Next = OldNode->m_Next;
721  }
722  if (OldNode == m_TailNode)
723  {
724  m_TailNode = OldNode->m_Prev;
725  }
726  else
727  {
728  OldNode->m_Next->m_Prev = OldNode->m_Prev;
729  }
730  FreeNode(OldNode);
731 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:803
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416

Referenced by CAvailableApps::Enum().

◆ RemoveHead()

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

Definition at line 604 of file atlcoll.h.

605 {
606  CNode* Node = m_HeadNode;
607  E Element(Node->m_Element);
608 
609  m_HeadNode = Node->m_Next;
610  if (m_HeadNode)
611  {
613  }
614  else
615  {
616  m_TailNode = NULL;
617  }
618  FreeNode(Node);
619 
620  return Element;
621 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:803
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416
Definition: dlist.c:348

◆ RemoveTail()

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

Definition at line 624 of file atlcoll.h.

625 {
626  CNode* Node = m_TailNode;
627  E Element(Node->m_Element);
628 
629  m_TailNode = Node->m_Prev;
630  if (m_TailNode)
631  {
633  }
634  else
635  {
636  m_HeadNode = NULL;
637  }
638  FreeNode(Node);
639 
640  return Element;
641 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:803
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:415
CNode * m_TailNode
Definition: atlcoll.h:416
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 413 of file atlcoll.h.

◆ m_BlockSize

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

Definition at line 414 of file atlcoll.h.

◆ m_FreeNode

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

Definition at line 417 of file atlcoll.h.

◆ m_HeadNode

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

Definition at line 415 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 418 of file atlcoll.h.

◆ m_TailNode

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

Definition at line 416 of file atlcoll.h.


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