ReactOS  0.4.15-dev-1177-g6cb3b62
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 424 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 427 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 519 of file atlcoll.h.

519  :
520  m_Blocks(NULL),
521  m_BlockSize(nBlockSize),
522  m_HeadNode(NULL),
523  m_TailNode(NULL),
524  m_FreeNode(NULL),
525  m_NumElements(0)
526 {
527  ATLASSERT(nBlockSize > 0);
528 }
UINT m_BlockSize
Definition: atlcoll.h:451
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
CAtlPlex * m_Blocks
Definition: atlcoll.h:450
smooth NULL
Definition: ftsmooth.c:416
size_t m_NumElements
Definition: atlcoll.h:455
CNode * m_FreeNode
Definition: atlcoll.h:454
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453

◆ ~CAtlList()

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

Definition at line 531 of file atlcoll.h.

532 {
533  RemoveAll();
534 }
void RemoveAll()
Definition: atlcoll.h:725

Member Function Documentation

◆ AddHead()

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

Definition at line 607 of file atlcoll.h.

608 {
610  if (m_HeadNode)
611  {
613  }
614  else
615  {
616  m_TailNode = Node;
617  }
618  m_HeadNode = Node;
619 
620  return (POSITION)Node;
621 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:818
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453
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 624 of file atlcoll.h.

625 {
627  if (m_TailNode)
628  {
630  }
631  else
632  {
633  m_HeadNode = Node;
634  }
635  m_TailNode = Node;
636 
637  return (POSITION)Node;
638 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:818
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453
Definition: dlist.c:348

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

823 {
824  GetFreeNode();
825 
826  CNode* NewNode = m_FreeNode;
827  CNode* NextFree = m_FreeNode->m_Next;
828 
829  NewNode = new CNode(element);
830 
831  m_FreeNode = NextFree;
832  NewNode->m_Prev = Prev;
833  NewNode->m_Next = Next;
834  m_NumElements++;
835 
836  return NewNode;
837 }
CNode * GetFreeNode()
Definition: atlcoll.h:856
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:455
CNode * m_FreeNode
Definition: atlcoll.h:454

◆ Find()

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

Definition at line 771 of file atlcoll.h.

774 {
775  CNode* Node = (CNode*)posStartAfter;
776  if (Node == NULL)
777  {
778  Node = m_HeadNode;
779  }
780  else
781  {
782  Node = Node->m_Next;
783  }
784 
785  for (; Node != NULL; Node = Node->m_Next)
786  {
787  if (ETraits::CompareElements(Node->m_Element, element))
788  return (POSITION)Node;
789  }
790 
791  return NULL;
792 }
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:452
Definition: dlist.c:348

Referenced by CAvailableApps::Enum(), and CAvailableApps::RemoveSelected().

◆ FindIndex()

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

Definition at line 795 of file atlcoll.h.

796 {
797  if (iElement >= m_NumElements)
798  return NULL;
799 
800  if (m_HeadNode == NULL)
801  return NULL;
802 
803  CNode* Node = m_HeadNode;
804  for (size_t i = 0; i < iElement; i++)
805  {
806  Node = Node->m_Next;
807  }
808 
809  return (POSITION)Node;
810 }
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:455
CNode * m_HeadNode
Definition: atlcoll.h:452
Definition: dlist.c:348

◆ FreeNode()

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

Definition at line 840 of file atlcoll.h.

843 {
844  pNode->~CNode();
845  pNode->m_Next = m_FreeNode;
846  m_FreeNode = pNode;
847 
848  m_NumElements--;
849  if (m_NumElements == 0)
850  {
851  RemoveAll();
852  }
853 }
void RemoveAll()
Definition: atlcoll.h:725
size_t m_NumElements
Definition: atlcoll.h:455
CNode * m_FreeNode
Definition: atlcoll.h:454

◆ GetAt() [1/2]

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

Definition at line 593 of file atlcoll.h.

594 {
595  CNode* Node = (CNode*)pos;
596  return Node->m_Element;
597 }
Definition: Node.h:12
Definition: dlist.c:348

Referenced by CAvailableApps::Enum().

◆ GetAt() [2/2]

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

Definition at line 600 of file atlcoll.h.

601 {
602  CNode* Node = (CNode*)pos;
603  return Node->m_Element;
604 }
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 537 of file atlcoll.h.

538 {
539  return m_NumElements;
540 }
size_t m_NumElements
Definition: atlcoll.h:455

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

◆ GetFreeNode()

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

Definition at line 856 of file atlcoll.h.

857 {
858  if (m_FreeNode)
859  {
860  return m_FreeNode;
861  }
862 
863  CAtlPlex* Block = CAtlPlex::Create(m_Blocks, m_BlockSize, sizeof(CNode));
864  if (Block == NULL)
865  {
867  }
868 
869  CNode* Node = (CNode*)Block->GetData();
870  Node += (m_BlockSize - 1);
871  for (int i = m_BlockSize - 1; i >= 0; i--)
872  {
873  Node->m_Next = m_FreeNode;
874  m_FreeNode = Node;
875  Node--;
876  }
877 
878  return m_FreeNode;
879 }
UINT m_BlockSize
Definition: atlcoll.h:451
CAtlPlex * m_Blocks
Definition: atlcoll.h:450
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:454
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

◆ GetNext() [2/2]

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

Definition at line 569 of file atlcoll.h.

570 {
571  CNode* Node = (CNode*)pos;
572  pos = (POSITION)Node->m_Next;
573  return Node->m_Element;
574 }
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 577 of file atlcoll.h.

578 {
579  CNode* Node = (CNode*)pos;
580  pos = (POSITION)Node->m_Prev;
581  return Node->m_Element;
582 }
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 585 of file atlcoll.h.

586 {
587  CNode* Node = (CNode*)pos;
588  pos = (POSITION)Node->m_Prev;
589  return Node->m_Element;
590 }
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 555 of file atlcoll.h.

556 {
557  return (POSITION)m_TailNode;
558 }
CNode * m_TailNode
Definition: atlcoll.h:453

◆ InsertAfter()

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

Definition at line 703 of file atlcoll.h.

704 {
705  if (pos == NULL)
706  return AddTail(element);
707 
708  CNode* OldNode = (CNode*)pos;
709  CNode* Node = CreateNode(element, OldNode, OldNode->m_Next);
710 
711  if (OldNode->m_Next != NULL)
712  {
713  OldNode->m_Next->m_Prev = Node;
714  }
715  else
716  {
717  m_TailNode = Node;
718  }
719  OldNode->m_Next = Node;
720 
721  return (POSITION)Node;
722 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:818
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
POSITION AddTail(INARGTYPE element)
Definition: atlcoll.h:624
CNode * m_TailNode
Definition: atlcoll.h:453
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 681 of file atlcoll.h.

682 {
683  if (pos == NULL)
684  return AddHead(element);
685 
686  CNode* OldNode = (CNode*)pos;
687  CNode* Node = CreateNode(element, OldNode->m_Prev, OldNode);
688 
689  if (OldNode->m_Prev != NULL)
690  {
691  OldNode->m_Prev->m_Next = Node;
692  }
693  else
694  {
695  m_HeadNode = Node;
696  }
697  OldNode->m_Prev = Node;
698 
699  return (POSITION)Node;
700 }
CNode * CreateNode(INARGTYPE element, _In_opt_ CNode *pPrev, _In_opt_ CNode *pNext)
Definition: atlcoll.h:818
union node Node
Definition: types.h:1255
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:452
POSITION AddHead(INARGTYPE element)
Definition: atlcoll.h:607
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 543 of file atlcoll.h.

544 {
545  return (m_NumElements == 0);
546 }
size_t m_NumElements
Definition: atlcoll.h:455

Referenced by CAvailableApps::FindAppByPkgName().

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

726 {
727  while (m_NumElements > 0)
728  {
729  CNode* Node = m_HeadNode;
731  FreeNode(Node);
732  }
733 
734  m_HeadNode = NULL;
735  m_TailNode = NULL;
736  m_FreeNode = NULL;
737 
738  if (m_Blocks)
739  {
740  m_Blocks->Destroy();
741  m_Blocks = NULL;
742  }
743 }
CAtlPlex * m_Blocks
Definition: atlcoll.h:450
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:840
smooth NULL
Definition: ftsmooth.c:416
void Destroy()
Definition: atlcoll.h:63
Definition: Node.h:12
size_t m_NumElements
Definition: atlcoll.h:455
CNode * m_FreeNode
Definition: atlcoll.h:454
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453
Definition: dlist.c:348

Referenced by CInstalledApps::FreeCachedEntries(), CAvailableApps::FreeCachedEntries(), and CAvailableApps::RemoveAllSelected().

◆ RemoveAt()

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

Definition at line 746 of file atlcoll.h.

747 {
748  ATLASSERT(pos != NULL);
749 
750  CNode* OldNode = (CNode*)pos;
751  if (OldNode == m_HeadNode)
752  {
753  m_HeadNode = OldNode->m_Next;
754  }
755  else
756  {
757  OldNode->m_Prev->m_Next = OldNode->m_Next;
758  }
759  if (OldNode == m_TailNode)
760  {
761  m_TailNode = OldNode->m_Prev;
762  }
763  else
764  {
765  OldNode->m_Next->m_Prev = OldNode->m_Prev;
766  }
767  FreeNode(OldNode);
768 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:840
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453

Referenced by CAvailableApps::Enum(), and CAvailableApps::RemoveSelected().

◆ RemoveHead()

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

Definition at line 641 of file atlcoll.h.

642 {
643  CNode* Node = m_HeadNode;
644  E Element(Node->m_Element);
645 
646  m_HeadNode = Node->m_Next;
647  if (m_HeadNode)
648  {
650  }
651  else
652  {
653  m_TailNode = NULL;
654  }
655  FreeNode(Node);
656 
657  return Element;
658 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:840
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453
Definition: dlist.c:348

◆ RemoveTail()

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

Definition at line 661 of file atlcoll.h.

662 {
663  CNode* Node = m_TailNode;
664  E Element(Node->m_Element);
665 
666  m_TailNode = Node->m_Prev;
667  if (m_TailNode)
668  {
670  }
671  else
672  {
673  m_HeadNode = NULL;
674  }
675  FreeNode(Node);
676 
677  return Element;
678 }
void FreeNode(_Inout_ CNode *pNode)
Definition: atlcoll.h:840
smooth NULL
Definition: ftsmooth.c:416
Definition: Node.h:12
static const WCHAR E[]
Definition: oid.c:1253
CNode * m_HeadNode
Definition: atlcoll.h:452
CNode * m_TailNode
Definition: atlcoll.h:453
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 450 of file atlcoll.h.

◆ m_BlockSize

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

Definition at line 451 of file atlcoll.h.

◆ m_FreeNode

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

Definition at line 454 of file atlcoll.h.

◆ m_HeadNode

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

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

◆ m_TailNode

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

Definition at line 453 of file atlcoll.h.


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