OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TShellItemIterator is an interator for walking through the contents of a folder. More...
#include <owl/shellitm.h>
Public Types | |
enum | TIncludeKind { Folders = SHCONTF_FOLDERS , NonFolders = SHCONTF_NONFOLDERS , HiddenAndSystem = SHCONTF_INCLUDEHIDDEN } |
Used by TShellItemIterator::TShellItemIterator(const TShellItem& folder, HWND windowOwner = 0, const UINT kind = Folders | NonFolders) See MS doc for SHCONTF for more information, Programmer's Guide to MS Windows 95, MS Press, p. More... | |
Public Member Functions | |
TShellItemIterator (const TShellItem &folder, HWND windowOwner=0, const int kind=Folders|NonFolders) | |
TShellItemIterator constructor. | |
TShellItemIterator (const TShellItemIterator &source) | |
TShellItemIterator copy constructor. | |
TShellItemIterator & | operator= (const TShellItemIterator &source) |
Assignment operator. | |
bool | Valid () const |
True if iterator is still valid. | |
long | GetCount () const |
Get number of TShellItems in the list. | |
TShellItem::TCreateStruct | operator++ () |
operator ++ increments the "cursor" in the iterator, then returns the item pointed to by the cursor | |
TShellItem::TCreateStruct | operator++ (int) |
operator ++(int) returns the item pointed to by the "cursor," then increments the cursor. | |
TShellItem::TCreateStruct | operator-- () |
operator – decrements the "cursor" in the iterator, then returns the item pointed to by the cursor | |
TShellItem::TCreateStruct | operator-- (int) |
operator –(int) returns the item pointed to by the "cursor," then decrements the cursor. | |
TShellItem::TCreateStruct | operator[] (const long index) |
operator [] returns the item at the <index> location. | |
TShellItem::TCreateStruct | Current () |
operator Current returns the item pointed to by the "cursor" | |
void | Skip (const ulong count) |
Skip count items. | |
void | Reset () |
Reset list. | |
Public Member Functions inherited from owl::TComRef< IEnumIDList > | |
TComRef () | |
TComRef (IEnumIDList *iface) | |
TComRef (const TComRef< IEnumIDList > &i) | |
TComRef< IEnumIDList > & | operator= (IEnumIDList *iface) |
TComRef< IEnumIDList > & | operator= (const TComRef< IEnumIDList > &i) |
IEnumIDList * | operator-> () |
IEnumIDList * | operator-> () const |
Public Member Functions inherited from owl::TComRefBase< T > | |
operator T* () | |
operator T** () | |
int | operator! () const |
void | operator delete (void *p) |
Protected Member Functions | |
void | Next () |
Next is a protected function that increments the cursor. Equivalent to Skip(1). | |
void | EnforceValidInterface () const |
EnforceValidInterface is a protected function that checks to see that this TShellItemIterator contains a valid IEnumIDList interface pointer. | |
Protected Member Functions inherited from owl::TComRefBase< T > | |
TComRefBase (const TComRefBase< T > &i) | |
TComRefBase (T *i) | |
TComRefBase () | |
~TComRefBase () | |
void | Clear () |
Additional Inherited Members | |
Protected Attributes inherited from owl::TComRefBase< T > | |
T * | I |
TShellItemIterator is an interator for walking through the contents of a folder.
A folder is a TShellItem whose IsFolder or ContainsSubFolder attributes are true.
Definition at line 565 of file shellitm.h.
Used by TShellItemIterator::TShellItemIterator(const TShellItem& folder, HWND windowOwner = 0, const UINT kind = Folders | NonFolders) See MS doc for SHCONTF for more information, Programmer's Guide to MS Windows 95, MS Press, p.
Enumerator | |
---|---|
Folders | For shell browser. |
NonFolders | For default view. |
HiddenAndSystem | For hidden or system objects. |
Definition at line 571 of file shellitm.h.
owl::TShellItemIterator::TShellItemIterator | ( | const TShellItem & | folder, |
HWND | windowOwner = 0, | ||
const int | kind = Folders | NonFolders ) |
TShellItemIterator constructor.
Additional Documentation: See MS doc on IEnumIDList for more info, Programmer's Guide to MS Windows 95, MS Press, pp. 199-201.
Definition at line 1584 of file shellitm.cpp.
References Next().
owl::TShellItemIterator::TShellItemIterator | ( | const TShellItemIterator & | source | ) |
TShellItemIterator copy constructor.
Definition at line 1603 of file shellitm.cpp.
References _T, owl::TXShell::Check(), CONST_CAST, owl::TComRefBase< T >::I, STATIC_CAST, and WARNX.
TShellItem::TCreateStruct owl::TShellItemIterator::Current | ( | ) |
operator Current returns the item pointed to by the "cursor"
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1748 of file shellitm.cpp.
References _T, CONST_CAST, EnforceValidInterface(), owl::TXShell::Raise(), STATIC_CAST, and WARNX.
|
protected |
EnforceValidInterface is a protected function that checks to see that this TShellItemIterator contains a valid IEnumIDList interface pointer.
If it doesn't, it throws an exception.
Definition at line 1889 of file shellitm.cpp.
References _T, CONST_CAST, owl::TComRefBase< T >::I, owl::TXShell::Raise(), STATIC_CAST, and WARNX.
long owl::TShellItemIterator::GetCount | ( | ) | const |
Get number of TShellItems in the list.
GetCount returns the number of items in the iterator's list.
Definition at line 1870 of file shellitm.cpp.
References EnforceValidInterface().
|
protected |
Next is a protected function that increments the cursor. Equivalent to Skip(1).
Definition at line 1762 of file shellitm.cpp.
References _T, owl::TXShell::Check(), CONST_CAST, EnforceValidInterface(), owl::TComRefBase< T >::I, owl::TXShell::Raise(), STATIC_CAST, and WARNX.
TShellItem::TCreateStruct owl::TShellItemIterator::operator++ | ( | ) |
operator ++ increments the "cursor" in the iterator, then returns the item pointed to by the cursor
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1663 of file shellitm.cpp.
References EnforceValidInterface(), and operator[]().
TShellItem::TCreateStruct owl::TShellItemIterator::operator++ | ( | int | ) |
operator ++(int) returns the item pointed to by the "cursor," then increments the cursor.
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1678 of file shellitm.cpp.
References _T, CONST_CAST, EnforceValidInterface(), Next(), owl::TXShell::Raise(), STATIC_CAST, and WARNX.
TShellItem::TCreateStruct owl::TShellItemIterator::operator-- | ( | ) |
operator – decrements the "cursor" in the iterator, then returns the item pointed to by the cursor
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1706 of file shellitm.cpp.
References EnforceValidInterface(), and operator[]().
TShellItem::TCreateStruct owl::TShellItemIterator::operator-- | ( | int | ) |
operator –(int) returns the item pointed to by the "cursor," then decrements the cursor.
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1725 of file shellitm.cpp.
References _T, CONST_CAST, EnforceValidInterface(), Next(), owl::TXShell::Raise(), Reset(), Skip(), STATIC_CAST, and WARNX.
TShellItemIterator & owl::TShellItemIterator::operator= | ( | const TShellItemIterator & | source | ) |
Assignment operator.
TShellItemIterator assignment operator.
Definition at line 1627 of file shellitm.cpp.
References _T, owl::TXShell::Check(), CONST_CAST, owl::TComRefBase< T >::I, STATIC_CAST, and WARNX.
TShellItem::TCreateStruct owl::TShellItemIterator::operator[] | ( | const long | index | ) |
operator [] returns the item at the <index> location.
index is zero based.
The item is returned as a TShellItem::TCreateStruct structure. For more information about TCreateStruct, see the comments in the TShellItem::TShellItem(const TCreateStruct& cs) constructor.
Definition at line 1840 of file shellitm.cpp.
References _T, CONST_CAST, EnforceValidInterface(), Next(), owl::TXShell::Raise(), Reset(), Skip(), STATIC_CAST, and WARNX.
void owl::TShellItemIterator::Reset | ( | ) |
Reset list.
Reset resets the cursor to the beginning.
Definition at line 1815 of file shellitm.cpp.
References _T, owl::TXShell::Check(), CONST_CAST, EnforceValidInterface(), owl::TComRefBase< T >::I, STATIC_CAST, and WARNX.
Skip count items.
Skip advances the cursor <count> times.
Equivalent to calling Next <count> times.
Definition at line 1790 of file shellitm.cpp.
References _T, owl::TXShell::Check(), CONST_CAST, EnforceValidInterface(), owl::TComRefBase< T >::I, STATIC_CAST, and WARNX.
|
inline |
True if iterator is still valid.
Return true if TShellItemIterator is valid and not at end of list of items.
Definition at line 1171 of file shellitm.h.