DigitalSpaces::DIStringList1 Struct Reference
[Lists]

#include <ContainerInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.

Inherited by DigitalSpaces::DIStringList1Impl.


Detailed Description

A collection of strings that can be iterated through.

The implementation needs to keep an internal state, of which of its entries is "current".


Public Member Functions

void Restart ()
 Resets "current" to the first item.
const char * GetCurrent ()
 Gets the "current" entry.
bool Advance ()
 Advances "current".
bool AtEnd ()
 Check if "current" is past the end of the list.
unsigned int Size ()
 Returns the length of the list.
const char * GetCurrentAndAdvance ()
 Calls GetCurrent then Advance, returning the value from GetCurrent.
bool Empty ()
 Check if the list is empty.
void PushBack (const char *)
 Appends a string to the list.
void Clear ()
 Removes all items from the list.

Member Function Documentation

void DigitalSpaces::DIStringList1::Restart (  ) 

Resets "current" to the first item.

Reimplemented in DigitalSpaces::DIStringList1Impl.

const char* DigitalSpaces::DIStringList1::GetCurrent (  ) 

Gets the "current" entry.

Reimplemented in DigitalSpaces::DIStringList1Impl.

bool DigitalSpaces::DIStringList1::Advance (  ) 

Advances "current".

Returns:
False if at the end of the list. In this case, the result from GetCurrent is undefined.

Reimplemented in DigitalSpaces::DIStringList1Impl.

bool DigitalSpaces::DIStringList1::AtEnd (  ) 

Check if "current" is past the end of the list.

This will be the same as checking if Advance has returned false. If true, GetCurrent returns undefined answers.

Returns:
True if at the end of the list, false if not.

Reimplemented in DigitalSpaces::DIStringList1Impl.

unsigned int DigitalSpaces::DIStringList1::Size (  ) 

Returns the length of the list.

Reimplemented in DigitalSpaces::DIStringList1Impl.

const char* DigitalSpaces::DIStringList1::GetCurrentAndAdvance (  ) 

Calls GetCurrent then Advance, returning the value from GetCurrent.

This is a convenience function.

Reimplemented in DigitalSpaces::DIStringList1Impl.

bool DigitalSpaces::DIStringList1::Empty (  ) 

Check if the list is empty.

Depending on the implementation, this may be faster then calling Size and comparing to zero, particularly in cases where the list is not empty.

Reimplemented in DigitalSpaces::DIStringList1Impl.

void DigitalSpaces::DIStringList1::PushBack ( const char *   ) 

Appends a string to the list.

Reimplemented in DigitalSpaces::DIStringList1Impl.

void DigitalSpaces::DIStringList1::Clear (  ) 

Removes all items from the list.

Reimplemented in DigitalSpaces::DIStringList1Impl.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:28 2008 for Digital Spaces by  doxygen 1.5.6