#include <memory.h>
Inheritance diagram for ucommon::DirPager:
Public Member Functions | |
char * | at (unsigned item) |
unsigned | count (void) |
Get the number of items in the pager string list. | |
DirPager (char *path) | |
char * | get (unsigned item) |
Get string item from list. | |
char * | operator * () |
operator bool () | |
bool | operator! () |
void | operator= (char *path) |
char * | operator[] (unsigned item) |
Return specified filename from directory list. | |
unsigned | pages (void) |
Get the number of pages that have been allocated from the real heap. | |
size_t | size (void) |
Get the size of a memory page. | |
Protected Member Functions | |
virtual bool | filter (char *filename, size_t size) |
Filter filenames in a derived class. | |
bool | load (char *path) |
Load a directory path. | |
Protected Attributes | |
char * | dir |
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.
Definition at line 593 of file memory.h.
unsigned ucommon::DirPager::count | ( | void | ) | [inline] |
Get the number of items in the pager string list.
Reimplemented from ucommon::StringPager.
virtual bool ucommon::DirPager::filter | ( | char * | filename, | |
size_t | size | |||
) | [protected, virtual] |
Filter filenames in a derived class.
The default filter drops "." special files.
filename | to filter. | |
size | of filename buffer. |
Reimplemented from ucommon::StringPager.
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.
unsigned ucommon::DirPager::pages | ( | void | ) | [inline] |
Get the number of pages that have been allocated from the real heap.
Reimplemented from ucommon::StringPager.
size_t ucommon::DirPager::size | ( | void | ) | [inline] |
Get the size of a memory page.
Reimplemented from ucommon::StringPager.