HTMLFileList Class Reference

List of Item. More...

#include <htmllist.h>

Inheritance diagram for HTMLFileList:

List CCObject SimpleCCObject List of all members.

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:

Detailed Description

List of Item.

Author:
Olivier_Gascoin (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/04/97
See also:
List

Definition at line 153 of file htmllist.h.


Member Function Documentation

BOOL HTMLFileList::Add HTMLFileListItem pItem  ) 
 

add an element in the list See also: AddTail()

Author:
Olivier_Gascoin (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/04/97
Parameters:
pItem - Item to add in the list [INPUTS]
Returns:

Errors:

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 }

BOOL HTMLFileList::IsAlreadyInList HTMLFileListItem pItem  ) 
 

check whether pItem is already in the list or not See also:

Author:
Olivier_Gascoin (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/04/97
Parameters:
pItem - Item to check [INPUTS]
Returns:
TRUE if pItem is already in the list, FALSE otherwise.

Errors:

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 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:10 2007 for Camelot by  doxygen 1.4.4