CAtlList::IsEmpty

Chamar esse método para determinar se a lista estiver vazia.

bool IsEmpty( ) const throw( );

Valor de retorno

Retorna se a lista não contém nenhum objeto, se não falso true.

Exemplo

// 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

Cabeçalho: atlcoll.h

Consulte também

Referência

Classe de CAtlList

CAtlList::GetCount