UCommon
|
Directory pager is a paged string list for directory file names. More...
#include <memory.h>
Public Member Functions | |
DirPager (char *path) | |
char * | get (unsigned item) |
Get string item from list. | |
operator bool () | |
bool | operator! () |
char * | operator* () |
void | operator= (char *path) |
char * | operator[] (unsigned item) |
Return specified filename from directory list. | |
Protected Member Functions | |
virtual bool | filter (char *filename) |
Filter filenames in a derived class. | |
bool | load (char *path) |
Load a directory path. | |
Protected Attributes | |
char * | dir |
Directory pager is a paged string list for directory file names.
This protocol is used to convert a directory into a list of filenames. As a protocol it offers a filtering method to select which files to include in the list.
virtual bool ucommon::DirPager::filter | ( | char * | filename | ) | [protected, virtual] |
Filter filenames in a derived class.
filename | to filter. |
char* ucommon::DirPager::get | ( | unsigned | item | ) | [inline] |
Get string item from list.
This is useful when stringpager is passed as a pointer and hence inconvenient for the [] operator.
item | to access. |
Reimplemented from ucommon::stringpager.
bool ucommon::DirPager::load | ( | char * | path | ) | [protected] |
Load a directory path.
path | to load. |
char* ucommon::DirPager::operator[] | ( | unsigned | item | ) | [inline] |
Return specified filename from directory list.
This is a convenience operator.
item | to access. |
Reimplemented from ucommon::stringpager.