Public Member Functions | |
QDescriptorList () | |
ctor | |
virtual | ~QDescriptorList () |
dtor | |
void | AddDescriptor (QFileDescriptor *ptr) |
add file descriptor to the list | |
void | DelDescriptor (int index) |
remove descriptor at requested index | |
QFileDescriptor * | operator[] (int) |
return descriptor at requested index or NULL if index is invalid | |
struct pollfd * | GetPollFds () |
returns an array containing one pollfd struct for each file descriptor handled by this object (or NULL if the list is empty) | |
int | Elements () const |
get the number of file descriptors handled by this object | |
Private Attributes | |
QFileDescriptor * | fHead |
QFileDescriptor * | fTail |
int | fElements |
void QDescriptorList::DelDescriptor | ( | int | index | ) |
remove descriptor at requested index
Remove file descriptor from list and delete associated object. Do nothing if index is invalid.
References QFileDescriptor::Next(), and QFileDescriptor::SetNext().
Referenced by QPollChain::DoPoll().
struct pollfd * QDescriptorList::GetPollFds | ( | ) | [read] |
returns an array containing one pollfd struct for each file descriptor handled by this object (or NULL if the list is empty)
For each file descriptor, the events field of the pollfd struct is set to POLLIN.
References QFileDescriptor::FileDescriptor(), and QFileDescriptor::Next().
Referenced by QPollChain::DoPoll().