17 capacity_(0), size_(0)
46 const int pos =
size_;
63 const int delPos =
index_[fd];
68 const int lastPos =
size_-1;
86 const int lastPos =--
size_;
101 os <<
size_ <<
" FDs";
int pop()
deletes and returns one descriptor, in unspecified order
bool del(int fd)
deletes if there; returns true if deleted
int * index_
descriptor:position index into descriptors_
bool empty() const
number of descriptors in the set
int * descriptors_
descriptor values in random order
int size_
number of descriptors in the set
bool has(const int fd) const
checks whether fd is in the set
void print(std::ostream &os) const
outputs debugging info about the set
int capacity_
total number of descriptor slots
bool add(int fd)
adds if unique; returns true if added