CAtlList::IsEmpty

Llame a este método para determinar si la lista está vacía.

bool IsEmpty( ) const throw( );

Valor devuelto

Devuelve si la lista no contiene ningún objeto; de lo contrario false.

Ejemplo

// Define the integer list
CAtlList<int> myList;

// Populate the list
myList.AddTail(1);
myList.AddTail(2);
myList.AddTail(3);
myList.AddTail(4);

// Confirm not empty
ATLASSERT(myList.IsEmpty() == false);

// Remove the tail element
myList.RemoveTailNoReturn();

// Confirm not empty
ATLASSERT(myList.IsEmpty() == false);

// Remove the head element
myList.RemoveHeadNoReturn();

// Confirm not empty
ATLASSERT(myList.IsEmpty() == false);

// Remove all remaining elements
myList.RemoveAll();

// Confirm empty
ATLASSERT(myList.IsEmpty() == true);   

Requisitos

encabezado: atlcoll.h

Vea también

Referencia

Clase de CAtlList

CAtlList::GetCount