#include <htmllist.h>
Inheritance diagram for HTMLFileList:
Public Member Functions | |
BOOL | Add (HTMLFileListItem *pItem) |
add an element in the list See also: AddTail() | |
BOOL | IsAlreadyInList (HTMLFileListItem *pItem) |
check whether pItem is already in the list or not See also: |
Definition at line 153 of file htmllist.h.
|
add an element in the list See also: AddTail()
Definition at line 223 of file htmllist.cpp. 00224 { 00225 //Graham 8/8/97: Is our item already in the list? 00226 if (IsAlreadyInList(pItem)) 00227 { 00228 //Yes. So return FALSE 00229 return FALSE; 00230 } 00231 else 00232 { 00233 //No. So add it. 00234 AddTail(pItem); 00235 00236 //And return TRUE 00237 return TRUE; 00238 } 00239 }
|
|
check whether pItem is already in the list or not See also:
Definition at line 256 of file htmllist.cpp. 00257 { 00258 // how many item in the list ? 00259 DWORD NbItem = GetCount(); 00260 00261 // is it already in the list 00262 if (NbItem != 0) 00263 { 00264 // first item of the list 00265 HTMLFileListItem* ListBitmaps = (HTMLFileListItem*)GetHead(); 00266 if ((ListBitmaps->GetFileName()).IsIdentical(pItem->GetFileName())) 00267 return TRUE; 00268 00269 // scan the list 00270 while(ListBitmaps = (HTMLFileListItem*)GetNext(ListBitmaps)) 00271 { 00272 if ((ListBitmaps->GetFileName()).IsIdentical(pItem->GetFileName())) 00273 return TRUE; 00274 } 00275 } 00276 00277 return FALSE; 00278 }
|