#include <ContainerInterfaces.h>
Inherits DigitalSpaces::DIObjectBase.
The implementation needs to keep an internal state, of which of its entries is "current".
This collection interface is used when a function will be providing a list of objects. Rather then have a interface declaration for a unique type of list for each type of object being returned, we use a list of the common base interface, which can be dss_cast or QueryInterface to the desired interface.
Public Member Functions | |
| void | Restart () |
| Resets "current" to the first item. | |
| DIObjectBase *const | 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. | |
| DIObjectBase *const | GetCurrentAndAdvance () |
| Calls GetCurrent then Advance, returning the value from GetCurrent. | |
| bool | Empty () |
| Check if the list is empty. | |
| void | PushBack (DIObjectBase *) |
| Appends an object to the list. | |
| void | Clear () |
| Removes all items from the list. | |
| void DigitalSpaces::DIObjectBaseList1::Restart | ( | ) |
Resets "current" to the first item.
| DIObjectBase* const DigitalSpaces::DIObjectBaseList1::GetCurrent | ( | ) |
Gets the "current" entry.
| bool DigitalSpaces::DIObjectBaseList1::Advance | ( | ) |
Advances "current".
| bool DigitalSpaces::DIObjectBaseList1::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.
| unsigned int DigitalSpaces::DIObjectBaseList1::Size | ( | ) |
Returns the length of the list.
| DIObjectBase* const DigitalSpaces::DIObjectBaseList1::GetCurrentAndAdvance | ( | ) |
Calls GetCurrent then Advance, returning the value from GetCurrent.
This is a convenience function.
| bool DigitalSpaces::DIObjectBaseList1::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.
| void DigitalSpaces::DIObjectBaseList1::PushBack | ( | DIObjectBase * | ) |
Appends an object to the list.
| void DigitalSpaces::DIObjectBaseList1::Clear | ( | ) |
Removes all items from the list.
1.5.6