次の方法で共有


CAtlList::IsEmpty

リストが空かどうかを確認します。

bool IsEmpty( ) const throw( );

戻り値

リストにオブジェクトが含まれない場合は true、それ以外の場合は false を返します。

使用例

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

必要条件

**ヘッダー:**atlcoll.h

参照

参照

CAtlList クラス

CAtlList::GetCount

その他の技術情報

CAtlList のメンバー